Skip to content

Commit

Permalink
Nav: Press Left on a child with ImGuiTreeNodeFlags_NavCloseFromChild …
Browse files Browse the repository at this point in the history
…moves you to parent node instead of closing it immediately. More standard. (#787, #1079)
  • Loading branch information
ocornut committed Feb 2, 2018
1 parent ce9d7ba commit 648de2f
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions imgui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12545,9 +12545,7 @@ void ImGui::TreePop()
if (g.NavMoveDir == ImGuiDir_Left && g.NavWindow == window && NavMoveRequestButNoResultYet())
if (g.NavIdIsAlive && (window->DC.TreeDepthMayCloseOnPop & (1 << window->DC.TreeDepth)))
{
ImGuiID id = window->IDStack.back();
window->DC.StateStorage->SetBool(id, false);
SetNavID(id, g.NavLayer);
SetNavID(window->IDStack.back(), g.NavLayer);
NavMoveRequestCancel();
}
window->DC.TreeDepthMayCloseOnPop &= (1 << window->DC.TreeDepth) - 1;
Expand Down

0 comments on commit 648de2f

Please sign in to comment.