mirror of
https://github.com/cookiengineer/audacity
synced 2025-05-04 17:49:45 +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 auto lastFlags = flags;
|
||||
|
||||
if (auto focus = wxWindow::FindFocus()) {
|
||||
// if (auto focus = wxWindow::FindFocus()) {
|
||||
if (wxWindow * focus = &project) {
|
||||
while (focus && focus->GetParent())
|
||||
focus = focus->GetParent();
|
||||
if (focus && !static_cast<wxTopLevelWindow*>(focus)->IsIconized())
|
||||
flags |= NotMinimizedFlag;
|
||||
}
|
||||
|
||||
// quick 'short-circuit' return.
|
||||
if ( checkActive && !project.IsActive() ){
|
||||
// short cirucit return should preserve flags that have not been calculated.
|
||||
flags = (lastFlags & ~NotMinimizedFlag) | flags;
|
||||
lastFlags = flags;
|
||||
return flags;
|
||||
}
|
||||
|
||||
// These flags are cheap to calculate.
|
||||
if (!gAudioIO->IsAudioTokenActive(project.GetAudioIOToken()))
|
||||
flags |= AudioIONotBusyFlag;
|
||||
else
|
||||
@ -426,6 +420,17 @@ CommandFlag MenuManager::GetUpdateFlags
|
||||
else
|
||||
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();
|
||||
const auto &selectedRegion = viewInfo.selectedRegion;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user