mirror of
https://git.mirrors.martin98.com/https://github.com/prusa3d/PrusaSlicer.git
synced 2025-08-12 06:38:58 +08:00
imgui: Fix char input handling
This commit is contained in:
parent
cb8677b310
commit
478032ad28
@ -5231,8 +5231,8 @@ void GLCanvas3D::on_char(wxKeyEvent& evt)
|
||||
#if ENABLE_IMGUI
|
||||
auto imgui = wxGetApp().imgui();
|
||||
if (imgui->update_key_data(evt)) {
|
||||
return;
|
||||
render();
|
||||
return;
|
||||
}
|
||||
#endif // ENABLE_IMGUI
|
||||
|
||||
|
@ -124,6 +124,9 @@ bool ImGuiWrapper::update_key_data(wxKeyEvent &evt)
|
||||
if (key != 0) {
|
||||
io.AddInputCharacter(key);
|
||||
}
|
||||
|
||||
new_frame();
|
||||
return want_keyboard() || want_text_input();
|
||||
} else {
|
||||
// Key up/down event
|
||||
int key = evt.GetKeyCode();
|
||||
@ -134,13 +137,13 @@ bool ImGuiWrapper::update_key_data(wxKeyEvent &evt)
|
||||
io.KeyCtrl = evt.ControlDown();
|
||||
io.KeyAlt = evt.AltDown();
|
||||
io.KeySuper = evt.MetaDown();
|
||||
}
|
||||
|
||||
// XXX: Unfortunatelly this seems broken due to some interference with wxWidgets,
|
||||
// we have to return true always (perform re-render).
|
||||
// new_frame();
|
||||
// return want_keyboard() || want_text_input();
|
||||
return true;
|
||||
// XXX: Unfortunatelly this seems broken due to some interference with wxWidgets,
|
||||
// we have to return true always (perform re-render).
|
||||
// new_frame();
|
||||
// return want_keyboard() || want_text_input();
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
void ImGuiWrapper::new_frame()
|
||||
|
Loading…
x
Reference in New Issue
Block a user