Disallow search match type toggle if input field is not focused.

This commit is contained in:
casey langen 2020-11-11 18:39:33 -08:00
parent 992b62be7a
commit bc96d35bb2
2 changed files with 2 additions and 2 deletions

View File

@ -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;
}

View File

@ -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;
}