From c48310c519f1a845f643ad797ba74c306f73a44d Mon Sep 17 00:00:00 2001 From: James Crook Date: Wed, 31 May 2017 23:19:43 +0100 Subject: [PATCH] Fix 'Disallowed' message when using up-arrow. This happened when transcription toolbar had focus, with and without tracks. --- src/commands/CommandManager.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/commands/CommandManager.cpp b/src/commands/CommandManager.cpp index 56eff575d..6f39cc12c 100644 --- a/src/commands/CommandManager.cpp +++ b/src/commands/CommandManager.cpp @@ -1157,6 +1157,12 @@ void CommandManager::TellUserWhyDisallowed( CommandFlag flagsGot, CommandMask fl // If the only thing wrong was no tracks, we do nothing and don't report a problem else if( missingFlags == TracksExistFlag ) return; + // Likewise return if it was just no tracks, and track panel did not have focus. (e.g. up-arrow to move track) + else if( missingFlags == (TracksExistFlag | TrackPanelHasFocus) ) + return; + // Likewise as above too... + else if( missingFlags == TrackPanelHasFocus ) + return; wxMessageBox(reason, _("Disallowed"), wxICON_WARNING | wxOK ); }