Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions src/context/internal/uicontextresolver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
4 changes: 1 addition & 3 deletions src/context/shortcutcontext.h
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand All @@ -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<std::string, 8> CONTEXTS_BY_INCREASING_PRIORITY {
static const std::array<std::string, 7> 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,
Expand Down
3 changes: 0 additions & 3 deletions src/framework/shortcuts/shortcutcontext.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
4 changes: 2 additions & 2 deletions src/playback/internal/playbackuiactions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading