From 97a40e74fb902a27473aa6b033d711ccd247949d Mon Sep 17 00:00:00 2001 From: omar Date: Tue, 29 Aug 2017 18:45:58 +0800 Subject: [PATCH] Nav: Fixed bad merge of 6def01be5df16e17d71f81a8d4083a0f48d04a8d so the bug fixed in #840 wasn't fully fixed in Nav branch. --- imgui.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/imgui.cpp b/imgui.cpp index 0dcafa2c5..c0f0c4b7e 100644 --- a/imgui.cpp +++ b/imgui.cpp @@ -1919,6 +1919,7 @@ void ImGui::SetActiveID(ImGuiID id, ImGuiWindow* window) g.ActiveIdWindow = window; if (id) { + g.ActiveIdIsAlive = true; g.ActiveIdSource = (g.NavActivateId == id || g.NavInputId == id || g.NavTabbedId == id) ? ImGuiInputSource_Nav : ImGuiInputSource_Mouse; if (g.ActiveIdSource == ImGuiInputSource_Nav) g.NavDisableMouseHover = true; @@ -1939,9 +1940,12 @@ void ImGui::SetActiveIDNoNav(ImGuiID id, ImGuiWindow* window) g.ActiveId = id; g.ActiveIdAllowNavDirFlags = 0; g.ActiveIdAllowOverlap = false; - g.ActiveIdIsAlive |= (id != 0); g.ActiveIdWindow = window; - g.ActiveIdSource = (g.NavActivateId == id || g.NavInputId == id) ? ImGuiInputSource_Nav : ImGuiInputSource_Mouse; + if (id) + { + g.ActiveIdIsAlive = true; + g.ActiveIdSource = (g.NavActivateId == id || g.NavInputId == id) ? ImGuiInputSource_Nav : ImGuiInputSource_Mouse; + } } void ImGui::ClearActiveID()