mirror of
https://github.com/cookiengineer/audacity
synced 2025-09-18 09:00:52 +02:00
Bug 2034 - Mac: first use of Record on 64-bit Audacity causes EGAs, Exports, Imports and Saves to be grayed out
This is a guess at the root cause of the bug.
This commit is contained in:
parent
5e1ec8dbe5
commit
b3a3b05e40
@ -401,21 +401,15 @@ CommandFlag MenuManager::GetUpdateFlags
|
|||||||
// static variable, used to remember flags for next time.
|
// static variable, used to remember flags for next time.
|
||||||
static auto lastFlags = flags;
|
static auto lastFlags = flags;
|
||||||
|
|
||||||
if (auto focus = wxWindow::FindFocus()) {
|
// if (auto focus = wxWindow::FindFocus()) {
|
||||||
|
if (wxWindow * focus = &project) {
|
||||||
while (focus && focus->GetParent())
|
while (focus && focus->GetParent())
|
||||||
focus = focus->GetParent();
|
focus = focus->GetParent();
|
||||||
if (focus && !static_cast<wxTopLevelWindow*>(focus)->IsIconized())
|
if (focus && !static_cast<wxTopLevelWindow*>(focus)->IsIconized())
|
||||||
flags |= NotMinimizedFlag;
|
flags |= NotMinimizedFlag;
|
||||||
}
|
}
|
||||||
|
|
||||||
// quick 'short-circuit' return.
|
// These flags are cheap to calculate.
|
||||||
if ( checkActive && !project.IsActive() ){
|
|
||||||
// short cirucit return should preserve flags that have not been calculated.
|
|
||||||
flags = (lastFlags & ~NotMinimizedFlag) | flags;
|
|
||||||
lastFlags = flags;
|
|
||||||
return flags;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!gAudioIO->IsAudioTokenActive(project.GetAudioIOToken()))
|
if (!gAudioIO->IsAudioTokenActive(project.GetAudioIOToken()))
|
||||||
flags |= AudioIONotBusyFlag;
|
flags |= AudioIONotBusyFlag;
|
||||||
else
|
else
|
||||||
@ -426,6 +420,17 @@ CommandFlag MenuManager::GetUpdateFlags
|
|||||||
else
|
else
|
||||||
flags |= NotPausedFlag;
|
flags |= NotPausedFlag;
|
||||||
|
|
||||||
|
// quick 'short-circuit' return.
|
||||||
|
if ( checkActive && !project.IsActive() ){
|
||||||
|
const auto checkedFlags =
|
||||||
|
NotMinimizedFlag | AudioIONotBusyFlag | AudioIOBusyFlag |
|
||||||
|
PausedFlag | NotPausedFlag;
|
||||||
|
// short cirucit return should preserve flags that have not been calculated.
|
||||||
|
flags = (lastFlags & ~checkedFlags) | flags;
|
||||||
|
lastFlags = flags;
|
||||||
|
return flags;
|
||||||
|
}
|
||||||
|
|
||||||
auto &viewInfo = project.GetViewInfo();
|
auto &viewInfo = project.GetViewInfo();
|
||||||
const auto &selectedRegion = viewInfo.selectedRegion;
|
const auto &selectedRegion = viewInfo.selectedRegion;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user