GUI: allow use of octave up/down whn fil pick open

issue #1895
This commit is contained in:
tildearrow 2024-10-17 16:22:04 -05:00
parent 5eae36f092
commit 9fbb7df674

View file

@ -1472,7 +1472,6 @@ void FurnaceGUI::orderInput(int num) {
void FurnaceGUI::keyDown(SDL_Event& ev) {
if (introPos<11.0 && !shortIntro) return;
if (ImGuiFileDialog::Instance()->IsOpened()) return;
if (aboutOpen) return;
if (cvOpen) return;
@ -1490,6 +1489,7 @@ void FurnaceGUI::keyDown(SDL_Event& ev) {
mapped|=FURKMOD_SHIFT;
}
if (!ImGuiFileDialog::Instance()->IsOpened()) {
if (bindSetActive) {
if (!ev.key.repeat) {
switch (ev.key.keysym.sym) {
@ -1735,12 +1735,16 @@ void FurnaceGUI::keyDown(SDL_Event& ev) {
default:
break;
}
}
// GLOBAL KEYS
auto actionI=actionMapGlobal.find(mapped);
if (actionI!=actionMapGlobal.cend()) {
int action=actionI->second;
if (action>0) {
if (ImGuiFileDialog::Instance()->IsOpened()) {
if (action!=GUI_ACTION_OCTAVE_UP && action!=GUI_ACTION_OCTAVE_DOWN) return;
}
doAction(action);
return;
}