mirror of
				https://github.com/Drezil/imgui.git
				synced 2025-11-04 07:01:04 +01:00 
			
		
		
		
	Misc comments, internal renaming, added disable indentation option to Columns demo section.
This commit is contained in:
		@@ -5073,7 +5073,7 @@ bool ImGui::TreeNodeBehavior(ImGuiID id, ImGuiTreeNodeFlags flags, const char* l
 | 
			
		||||
    // For this purpose we essentially compare if g.NavIdIsAlive went from 0 to 1 between TreeNode() and TreePop().
 | 
			
		||||
    // This is currently only support 32 level deep and we are fine with (1 << Depth) overflowing into a zero.
 | 
			
		||||
    if (is_open && !g.NavIdIsAlive && (flags & ImGuiTreeNodeFlags_NavLeftJumpsBackHere) && !(flags & ImGuiTreeNodeFlags_NoTreePushOnOpen))
 | 
			
		||||
        window->DC.TreeDepthMayJumpToParentOnPop |= (1 << window->DC.TreeDepth);
 | 
			
		||||
        window->DC.TreeStoreMayJumpToParentOnPop |= (1 << window->DC.TreeDepth);
 | 
			
		||||
 | 
			
		||||
    bool item_add = ItemAdd(interact_bb, id);
 | 
			
		||||
    window->DC.LastItemStatusFlags |= ImGuiItemStatusFlags_HasDisplayRect;
 | 
			
		||||
@@ -5223,12 +5223,12 @@ void ImGui::TreePop()
 | 
			
		||||
 | 
			
		||||
    window->DC.TreeDepth--;
 | 
			
		||||
    if (g.NavMoveDir == ImGuiDir_Left && g.NavWindow == window && NavMoveRequestButNoResultYet())
 | 
			
		||||
        if (g.NavIdIsAlive && (window->DC.TreeDepthMayJumpToParentOnPop & (1 << window->DC.TreeDepth)))
 | 
			
		||||
        if (g.NavIdIsAlive && (window->DC.TreeStoreMayJumpToParentOnPop & (1 << window->DC.TreeDepth)))
 | 
			
		||||
        {
 | 
			
		||||
            SetNavID(window->IDStack.back(), g.NavLayer);
 | 
			
		||||
            NavMoveRequestCancel();
 | 
			
		||||
        }
 | 
			
		||||
    window->DC.TreeDepthMayJumpToParentOnPop &= (1 << window->DC.TreeDepth) - 1;
 | 
			
		||||
    window->DC.TreeStoreMayJumpToParentOnPop &= (1 << window->DC.TreeDepth) - 1;
 | 
			
		||||
 | 
			
		||||
    IM_ASSERT(window->IDStack.Size > 1); // There should always be 1 element in the IDStack (pushed during window creation). If this triggers you called TreePop/PopID too much.
 | 
			
		||||
    PopID();
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user