mirror of
https://github.com/ocornut/imgui.git
synced 2024-12-01 02:37:24 +01:00
Nav: Press Left on a child with ImGuiTreeNodeFlags_NavCloseFromChild moves you to parent node instead of closing it immediately. More standard. (#787, #1079)
This commit is contained in:
parent
ce9d7baaba
commit
648de2fc00
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user