Fix imgui want to have persistant io key during new window

imgui assert  - [link]{b1bfef44ba/src/imgui/imgui.cpp (L7180)}
This commit is contained in:
Filip Sykala - NTB T15p 2022-12-06 14:33:34 +01:00
parent 2168d0935a
commit 12e6948fef

View File

@ -312,9 +312,6 @@ void ImGuiWrapper::new_frame()
init_font(true); init_font(true);
} }
ImGui::NewFrame();
m_new_frame_open = true;
ImGuiIO& io = ImGui::GetIO(); ImGuiIO& io = ImGui::GetIO();
// synchronize key states // synchronize key states
// when the application loses the focus it may happen that the key up event is not processed // 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)) if (io.KeysDown[key] && keycode != WXK_NONE && !wxGetKeyState(keycode))
io.KeysDown[key] = false; io.KeysDown[key] = false;
} }
ImGui::NewFrame();
m_new_frame_open = true;
} }
void ImGuiWrapper::render() void ImGuiWrapper::render()