Skip to content

Commit 6d03f93

Browse files
committed
Docking: Fixed assert preventing dockspace from being stored into a tab. (ocornut#3101)
1 parent 0e88430 commit 6d03f93

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

imgui_widgets.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6849,7 +6849,7 @@ void ImGui::TabBarAddTab(ImGuiTabBar* tab_bar, ImGuiTabItemFlags tab_flags, ImGu
68496849
{
68506850
ImGuiContext& g = *GImGui;
68516851
IM_ASSERT(TabBarFindTabByID(tab_bar, window->ID) == NULL);
6852-
IM_ASSERT(g.CurrentTabBar == NULL); // Can't work while the tab bar is active as our tab doesn't have an X offset yet
6852+
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)
68536853

68546854
ImGuiTabItem new_tab;
68556855
new_tab.ID = window->ID;

0 commit comments

Comments
 (0)