From 85ad8e0e2e4c928d69883dfa7f42bd368adf4ec0 Mon Sep 17 00:00:00 2001 From: omar Date: Tue, 30 Jul 2019 14:26:02 -0700 Subject: [PATCH] Nav: Fixed an issue with NavFlattened window flag where widgets not entirely fitting in child window (often selectable because of their extruded bits) would be not considered to navigate toward the child window. (#787) This creates a little bit of tension because g.NavDisableHighlight tends to makes the reference point not always visible. Amend c665c15a7d5942037852027cec88de9ccc2494ac --- imgui.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/imgui.cpp b/imgui.cpp index 8cbfa1290..ef50ee5b0 100644 --- a/imgui.cpp +++ b/imgui.cpp @@ -7761,7 +7761,7 @@ static bool NavScoreItem(ImGuiNavMoveResult* result, ImRect cand) if (window->ParentWindow == g.NavWindow) { IM_ASSERT((window->Flags | g.NavWindow->Flags) & ImGuiWindowFlags_NavFlattened); - if (!window->ClipRect.Contains(cand)) + if (!window->ClipRect.Overlaps(cand)) return false; cand.ClipWithFull(window->ClipRect); // This allows the scored item to not overlap other candidates in the parent window }