1
0
mirror of https://github.com/ocornut/imgui.git synced 2024-11-13 18:50:58 +01:00

Nav: NavProcessItem() computes window-relative rectangle using own Window rather than NavWindow. Not sure what it may mean for child-flattened-nav (disabled). (#787)

This commit is contained in:
omar 2017-10-16 00:36:31 +02:00
parent 7d14262202
commit 97851f7376

View File

@ -2219,7 +2219,7 @@ static void NavProcessItem(ImGuiWindow* window, const ImRect& nav_bb, const ImGu
// return; // return;
const ImGuiItemFlags item_flags = window->DC.ItemFlags; const ImGuiItemFlags item_flags = window->DC.ItemFlags;
const ImRect nav_bb_rel(nav_bb.Min - g.NavWindow->Pos, nav_bb.Max - g.NavWindow->Pos); const ImRect nav_bb_rel(nav_bb.Min - window->Pos, nav_bb.Max - window->Pos);
if (g.NavInitRequest && g.NavLayer == window->DC.NavLayerCurrent) if (g.NavInitRequest && g.NavLayer == window->DC.NavLayerCurrent)
{ {
// Even if 'ImGuiItemFlags_NoNavDefaultFocus' is on (typically collapse/close button) we record the first ResultId so they can be used as a fallback // Even if 'ImGuiItemFlags_NoNavDefaultFocus' is on (typically collapse/close button) we record the first ResultId so they can be used as a fallback