From bc96d35bb29782eeda10ab305f0c64ee6aa70da9 Mon Sep 17 00:00:00 2001 From: casey langen Date: Wed, 11 Nov 2020 18:39:33 -0800 Subject: [PATCH] Disallow search match type toggle if input field is not focused. --- src/musikcube/app/layout/CategorySearchLayout.cpp | 2 +- src/musikcube/app/layout/TrackSearchLayout.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/musikcube/app/layout/CategorySearchLayout.cpp b/src/musikcube/app/layout/CategorySearchLayout.cpp index dfde0ff1d..36cc44d35 100644 --- a/src/musikcube/app/layout/CategorySearchLayout.cpp +++ b/src/musikcube/app/layout/CategorySearchLayout.cpp @@ -207,7 +207,7 @@ bool CategorySearchLayout::KeyPress(const std::string& key) { return true; } } - else if (Hotkeys::Is(Hotkeys::SearchInputToggleMatchType, key)) { + else if (Hotkeys::Is(Hotkeys::SearchInputToggleMatchType, key) && this->input->IsFocused()) { this->ToggleMatchType(); return true; } diff --git a/src/musikcube/app/layout/TrackSearchLayout.cpp b/src/musikcube/app/layout/TrackSearchLayout.cpp index a53ea3f1a..348579e10 100755 --- a/src/musikcube/app/layout/TrackSearchLayout.cpp +++ b/src/musikcube/app/layout/TrackSearchLayout.cpp @@ -233,7 +233,7 @@ bool TrackSearchLayout::KeyPress(const std::string& key) { }); return true; } - else if (Hotkeys::Is(Hotkeys::SearchInputToggleMatchType, key)) { + else if (Hotkeys::Is(Hotkeys::SearchInputToggleMatchType, key) && this->input->IsFocused()) { this->ToggleMatchType(); return true; }