From 9f92cc255bbc9a922211806e6ea50e4c5ab91cb7 Mon Sep 17 00:00:00 2001 From: ocornut Date: Sat, 16 Jul 2016 10:36:09 +0200 Subject: [PATCH] SetActiveId() sets ActiveIdIsJustActivated only when id changes. (#323) --- imgui.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/imgui.cpp b/imgui.cpp index 19b44536..b8a6fe9c 100644 --- a/imgui.cpp +++ b/imgui.cpp @@ -1803,9 +1803,9 @@ ImGuiWindow* ImGui::GetParentWindow() void ImGui::SetActiveID(ImGuiID id, ImGuiWindow* window = NULL) { ImGuiContext& g = *GImGui; + g.ActiveIdIsJustActivated = (g.ActiveId != id); g.ActiveId = id; g.ActiveIdAllowOverlap = false; - g.ActiveIdIsJustActivated = true; g.ActiveIdWindow = window; }