Docking: Fixed DockNode tab bar initial order broken by 8c80d533d

This commit is contained in:
ocornut
2020-09-01 19:43:46 +02:00
parent fc625d249f
commit 8dacb4da20
3 changed files with 6 additions and 4 deletions

View File

@ -6885,7 +6885,8 @@ bool ImGui::BeginTabBarEx(ImGuiTabBar* tab_bar, const ImRect& tab_bar_bb, ImG
// When toggling ImGuiTabBarFlags_Reorderable flag, ensure tabs are ordered based on their submission order.
if ((flags & ImGuiTabBarFlags_Reorderable) != (tab_bar->Flags & ImGuiTabBarFlags_Reorderable) && tab_bar->Tabs.Size > 1)
ImQsort(tab_bar->Tabs.Data, tab_bar->Tabs.Size, sizeof(ImGuiTabItem), TabItemComparerByBeginOrder);
if ((flags & ImGuiTabBarFlags_DockNode) == 0)
ImQsort(tab_bar->Tabs.Data, tab_bar->Tabs.Size, sizeof(ImGuiTabItem), TabItemComparerByBeginOrder);
// Flags
if ((flags & ImGuiTabBarFlags_FittingPolicyMask_) == 0)