mirror of
				https://github.com/Drezil/imgui.git
				synced 2025-11-04 07:01:04 +01:00 
			
		
		
		
	Docking: Fixed assert preventing dockspace from being stored into a tab. (#3101)
This commit is contained in:
		@@ -6849,7 +6849,7 @@ void ImGui::TabBarAddTab(ImGuiTabBar* tab_bar, ImGuiTabItemFlags tab_flags, ImGu
 | 
				
			|||||||
{
 | 
					{
 | 
				
			||||||
    ImGuiContext& g = *GImGui;
 | 
					    ImGuiContext& g = *GImGui;
 | 
				
			||||||
    IM_ASSERT(TabBarFindTabByID(tab_bar, window->ID) == NULL);
 | 
					    IM_ASSERT(TabBarFindTabByID(tab_bar, window->ID) == NULL);
 | 
				
			||||||
    IM_ASSERT(g.CurrentTabBar == NULL);                     // Can't work while the tab bar is active as our tab doesn't have an X offset yet
 | 
					    IM_ASSERT(g.CurrentTabBar != tab_bar);  // Can't work while the tab bar is active as our tab doesn't have an X offset yet, in theory we could/should test something like (tab_bar->CurrFrameVisible < g.FrameCount) but we'd need to solve why triggers the commented early-out assert in BeginTabBarEx() (probably dock node going from implicit to explicit in same frame)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    ImGuiTabItem new_tab;
 | 
					    ImGuiTabItem new_tab;
 | 
				
			||||||
    new_tab.ID = window->ID;
 | 
					    new_tab.ID = window->ID;
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user