From cb48c81a448aa0a4867e327c0a045a708ff3842e Mon Sep 17 00:00:00 2001 From: ocornut Date: Fri, 9 Sep 2022 20:47:27 +0200 Subject: [PATCH] Tabs: Fix initial tab state. Amend 3e6f948( (#5572) Somehow this only triggers a failing test in docking branch. --- imgui_internal.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/imgui_internal.h b/imgui_internal.h index 86a05c403..09cdce269 100644 --- a/imgui_internal.h +++ b/imgui_internal.h @@ -2220,7 +2220,7 @@ struct ImGuiTabItem ImS16 IndexDuringLayout; // Index only used during TabBarLayout() bool WantClose; // Marked as closed by SetTabItemClosed() - ImGuiTabItem() { memset(this, 0, sizeof(*this)); LastFrameVisible = LastFrameSelected = -1; NameOffset = -1; BeginOrder = IndexDuringLayout = -1; } + ImGuiTabItem() { memset(this, 0, sizeof(*this)); LastFrameVisible = LastFrameSelected = -1; RequestedWidth = -1.0f; NameOffset = -1; BeginOrder = IndexDuringLayout = -1; } }; // Storage for a tab bar (sizeof() 152 bytes)