mirror of
https://github.com/Drezil/imgui.git
synced 2024-11-15 01:17:00 +00: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.NavMoveDir == ImGuiDir_Left && g.NavWindow == window && NavMoveRequestButNoResultYet())
|
||||||
if (g.NavIdIsAlive && (window->DC.TreeDepthMayCloseOnPop & (1 << window->DC.TreeDepth)))
|
if (g.NavIdIsAlive && (window->DC.TreeDepthMayCloseOnPop & (1 << window->DC.TreeDepth)))
|
||||||
{
|
{
|
||||||
ImGuiID id = window->IDStack.back();
|
SetNavID(window->IDStack.back(), g.NavLayer);
|
||||||
window->DC.StateStorage->SetBool(id, false);
|
|
||||||
SetNavID(id, g.NavLayer);
|
|
||||||
NavMoveRequestCancel();
|
NavMoveRequestCancel();
|
||||||
}
|
}
|
||||||
window->DC.TreeDepthMayCloseOnPop &= (1 << window->DC.TreeDepth) - 1;
|
window->DC.TreeDepthMayCloseOnPop &= (1 << window->DC.TreeDepth) - 1;
|
||||||
|
Loading…
Reference in New Issue
Block a user