mirror of
https://github.com/cookiengineer/audacity
synced 2025-06-17 16:40:07 +02:00
Bug 2215 - Cut does not work when in Pause mode
In bool MenuManager::TryToMakeActionAllowed(), there's the condition: (MissingFlags & enabler.possibleFlags()) == MissingFlags that is, the missing flags has to be a subset of the possible flags. For cut in pause mode, this condition is not met for the enabler stopIfPaused, because MissingFlags also includes the CutCopyAvailableFlag, which is not one of the enabler's possible flags. It is not sensible for the missing flags to have to be a subset of the possible flags, because for this to work, for each enabler the possible flags would have to include other flags that could need fixing by other enablers. Fix: 1. Change the condition to the intersection of the missing flags and possible flags is non-empty. 2. In CutCopyAvailableFlag, remove the condition !AudioIOBusyPred(). If this is present, then due to the first change, paused audio could cause all audio to be selected even when there was a selection. The commands for which this flag is used are cut and copy, and they already have AudioIONotBusy flags, so this change should not affect previous behaviour.
This commit is contained in:
parent
b06af2330b
commit
9e51dba3db
@ -661,7 +661,7 @@ bool MenuManager::TryToMakeActionAllowed(
|
||||
(flags & actual) == actual
|
||||
&&
|
||||
// Can we get the condition we need?
|
||||
(MissingFlags & enabler.possibleFlags()) == MissingFlags
|
||||
(MissingFlags & enabler.possibleFlags()).any()
|
||||
) {
|
||||
// Then try the function
|
||||
enabler.tryEnable( project, flagsRqd );
|
||||
|
@ -1011,8 +1011,6 @@ const ReservedCommandFlag
|
||||
return true;
|
||||
|
||||
if (
|
||||
!AudioIOBusyPred( project )
|
||||
&&
|
||||
TimeSelectedPred( project )
|
||||
&&
|
||||
TracksSelectedPred( project )
|
||||
|
Loading…
x
Reference in New Issue
Block a user