From 12e6948feff840c1d30a6af64c9b319f38e538b1 Mon Sep 17 00:00:00 2001 From: Filip Sykala - NTB T15p Date: Tue, 6 Dec 2022 14:33:34 +0100 Subject: [PATCH] Fix imgui want to have persistant io key during new window imgui assert - [link]{https://github.com/Prusa-Development/PrusaSlicerPrivate/blob/b1bfef44ba6bb72d925fc6c9f3133956be60e6ac/src/imgui/imgui.cpp#L7180} --- src/slic3r/GUI/ImGuiWrapper.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/slic3r/GUI/ImGuiWrapper.cpp b/src/slic3r/GUI/ImGuiWrapper.cpp index 7d68565e9..d7106173c 100644 --- a/src/slic3r/GUI/ImGuiWrapper.cpp +++ b/src/slic3r/GUI/ImGuiWrapper.cpp @@ -312,9 +312,6 @@ void ImGuiWrapper::new_frame() init_font(true); } - ImGui::NewFrame(); - m_new_frame_open = true; - ImGuiIO& io = ImGui::GetIO(); // synchronize key states // when the application loses the focus it may happen that the key up event is not processed @@ -343,6 +340,9 @@ void ImGuiWrapper::new_frame() if (io.KeysDown[key] && keycode != WXK_NONE && !wxGetKeyState(keycode)) io.KeysDown[key] = false; } + + ImGui::NewFrame(); + m_new_frame_open = true; } void ImGuiWrapper::render()