diff --git a/src/context/internal/uicontextresolver.cpp b/src/context/internal/uicontextresolver.cpp index 6c76803054aec..a27a084620277 100644 --- a/src/context/internal/uicontextresolver.cpp +++ b/src/context/internal/uicontextresolver.cpp @@ -201,8 +201,6 @@ bool UiContextResolver::isShortcutContextAllowed(const std::string& scContext) c if (CTX_NOTATION_OPENED == scContext) { return matchWithCurrent(context::UiCtxProjectOpened); - } else if (CTX_NOTATION_OPENED_PRIORITY == scContext) { - return matchWithCurrent(context::UiCtxProjectOpened); } else if (CTX_NOTATION_FOCUSED == scContext) { return matchWithCurrent(context::UiCtxProjectFocused); } else if (CTX_NOT_NOTATION_FOCUSED == scContext) { diff --git a/src/context/shortcutcontext.h b/src/context/shortcutcontext.h index 07ce241beb14c..80247eecf63fc 100644 --- a/src/context/shortcutcontext.h +++ b/src/context/shortcutcontext.h @@ -34,7 +34,6 @@ static const std::string CTX_ANY = muse::shortcuts::CTX_ANY; static const std::string CTX_NOTATION_OPENED = muse::shortcuts::CTX_PROJECT_OPENED; static const std::string CTX_NOTATION_FOCUSED = muse::shortcuts::CTX_PROJECT_FOCUSED; static const std::string CTX_NOT_NOTATION_FOCUSED = muse::shortcuts::CTX_NOT_PROJECT_FOCUSED; -static const std::string CTX_NOTATION_OPENED_PRIORITY = muse::shortcuts::CTX_PROJECT_OPENED_PRIORITY; /// We're not [in note input on a TAB staff] (i.e. either not in note input mode, or in note input mode but not on a TAB staff) static const std::string CTX_NOTATION_NOT_NOTE_INPUT_STAFF_TAB("notation-not-note-input-staff-tab"); @@ -51,12 +50,11 @@ class ShortcutContextPriority : public muse::shortcuts::IShortcutContextPriority bool hasLowerPriorityThan(const std::string& ctx1, const std::string& ctx2) const override { - static const std::array CONTEXTS_BY_INCREASING_PRIORITY { + static const std::array CONTEXTS_BY_INCREASING_PRIORITY { CTX_ANY, CTX_NOTATION_OPENED, CTX_NOT_NOTATION_FOCUSED, - CTX_NOTATION_OPENED_PRIORITY, CTX_NOTATION_FOCUSED, CTX_NOTATION_NOT_NOTE_INPUT_STAFF_TAB, diff --git a/src/framework/shortcuts/shortcutcontext.h b/src/framework/shortcuts/shortcutcontext.h index 7803415d864c5..2518fc7e0ef99 100644 --- a/src/framework/shortcuts/shortcutcontext.h +++ b/src/framework/shortcuts/shortcutcontext.h @@ -38,9 +38,6 @@ static const std::string CTX_PROJECT_FOCUSED("project-focused"); //! NOTE special context for navigation shortcuts because the project has its own navigation system static const std::string CTX_NOT_PROJECT_FOCUSED("not-project-focused"); -//! NOTE special context action play should be more priority than navigation control -static const std::string CTX_PROJECT_OPENED_PRIORITY("project-opened-priority"); - class IShortcutContextPriority : MODULE_EXPORT_INTERFACE { INTERFACE_ID(IShortcutContextPriority); diff --git a/src/playback/internal/playbackuiactions.cpp b/src/playback/internal/playbackuiactions.cpp index 58043fdcd4b01..8031f0c43b0dc 100644 --- a/src/playback/internal/playbackuiactions.cpp +++ b/src/playback/internal/playbackuiactions.cpp @@ -34,14 +34,14 @@ using namespace muse::actions; const UiActionList PlaybackUiActions::s_mainActions = { UiAction("play", mu::context::UiCtxProjectOpened, - mu::context::CTX_NOTATION_OPENED_PRIORITY, + mu::context::CTX_NOTATION_FOCUSED, TranslatableString("action", "Play"), TranslatableString("action", "Play"), IconCode::Code::PLAY ), UiAction("stop", mu::context::UiCtxProjectOpened, - mu::context::CTX_NOTATION_OPENED_PRIORITY, + mu::context::CTX_NOTATION_OPENED, TranslatableString("action", "Stop"), TranslatableString("action", "Stop playback"), IconCode::Code::STOP