From 458d92157a4fccb2524971f607e28a6c73b1901f Mon Sep 17 00:00:00 2001 From: David Bailes Date: Tue, 1 Oct 2019 13:56:33 +0100 Subject: [PATCH] Bug 2215 - Cut does not work when in Pause mode In bool MenuManager::TryToMakeActionAllowed(), there's the condition: (MissingFlags & enabler.possibleFlags()) == Missing 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: change the condition to the intersection of the missing flags and possible flags is non-empty. --- src/Menus.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Menus.cpp b/src/Menus.cpp index aec5db531..138cd3487 100644 --- a/src/Menus.cpp +++ b/src/Menus.cpp @@ -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 );