mirror of
https://github.com/Drezil/imgui.git
synced 2024-12-22 15:46:35 +00:00
Nav: clear navid in NavInitWindow() when window is marked with ImGuiWindowFlags_NoNavInputs. (#787)
(no expected side-effects, maybe consistency, but those NavLastIds[] values would likely have been 0 already)
This commit is contained in:
parent
daf97832f1
commit
e61e8aea9c
12
imgui.cpp
12
imgui.cpp
@ -8916,10 +8916,16 @@ void ImGui::NavInitWindow(ImGuiWindow* window, bool force_reinit)
|
||||
{
|
||||
ImGuiContext& g = *GImGui;
|
||||
IM_ASSERT(window == g.NavWindow);
|
||||
|
||||
if (window->Flags & ImGuiWindowFlags_NoNavInputs)
|
||||
{
|
||||
g.NavId = g.NavFocusScopeId = 0;
|
||||
return;
|
||||
}
|
||||
|
||||
bool init_for_nav = false;
|
||||
if (!(window->Flags & ImGuiWindowFlags_NoNavInputs))
|
||||
if (window == window->RootWindow || (window->Flags & ImGuiWindowFlags_Popup) || (window->NavLastIds[0] == 0) || force_reinit)
|
||||
init_for_nav = true;
|
||||
if (window == window->RootWindow || (window->Flags & ImGuiWindowFlags_Popup) || (window->NavLastIds[0] == 0) || force_reinit)
|
||||
init_for_nav = true;
|
||||
IMGUI_DEBUG_LOG_NAV("[nav] NavInitRequest: from NavInitWindow(), init_for_nav=%d, window=\"%s\", layer=%d\n", init_for_nav, window->Name, g.NavLayer);
|
||||
if (init_for_nav)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user