fix idle keybind, remove debug print

This commit is contained in:
Mark 2024-02-08 10:30:01 +01:00
parent b22d9ffeb3
commit b70d922fad
2 changed files with 1 additions and 2 deletions

View File

@ -1212,7 +1212,6 @@ impl Gui {
self.keybinds.remove(&b); self.keybinds.remove(&b);
} }
if let Some(bind) = bind { if let Some(bind) = bind {
eprintln!("Setting keybind: {:b} {:?}", bind.modifiers, bind.key);
self.keybinds.insert(bind, action); self.keybinds.insert(bind, action);
} }
} }
@ -1507,6 +1506,7 @@ impl WindowHandler<GuiEvent> for Gui {
for a in self.key_actions.get(action).execute() { for a in self.key_actions.get(action).execute() {
self.exec_gui_action(a); self.exec_gui_action(a);
} }
return;
} }
} }
} }

View File

@ -275,7 +275,6 @@ impl GuiElem for GuiScreen {
_scan: speedy2d::window::KeyScancode, _scan: speedy2d::window::KeyScancode,
) -> Vec<GuiAction> { ) -> Vec<GuiAction> {
if down { if down {
// on releasing Ctrl in Ctrl+I => Idle keybind, don't unidle
self.not_idle(); self.not_idle();
} }
if self.hotkey.triggered(modifiers, down, key) { if self.hotkey.triggered(modifiers, down, key) {