mirror of
https://github.com/Drezil/imgui.git
synced 2024-12-19 14:36:34 +00:00
Docking: Fixed DockNode tab bar initial order broken by 8c80d533d
This commit is contained in:
parent
fc625d249f
commit
8dacb4da20
@ -14144,6 +14144,7 @@ void ImGui::DockSpace(ImGuiID id, const ImVec2& size_arg, ImGuiDockNodeFlags fla
|
|||||||
flags |= ImGuiDockNodeFlags_KeepAliveOnly;
|
flags |= ImGuiDockNodeFlags_KeepAliveOnly;
|
||||||
|
|
||||||
IM_ASSERT((flags & ImGuiDockNodeFlags_DockSpace) == 0);
|
IM_ASSERT((flags & ImGuiDockNodeFlags_DockSpace) == 0);
|
||||||
|
IM_ASSERT(id != 0);
|
||||||
ImGuiDockNode* node = DockContextFindNodeByID(ctx, id);
|
ImGuiDockNode* node = DockContextFindNodeByID(ctx, id);
|
||||||
if (!node)
|
if (!node)
|
||||||
{
|
{
|
||||||
|
2
imgui.h
2
imgui.h
@ -1180,7 +1180,7 @@ enum ImGuiConfigFlags_
|
|||||||
|
|
||||||
// [BETA] Viewports
|
// [BETA] Viewports
|
||||||
// When using viewports it is recommended that your default value for ImGuiCol_WindowBg is opaque (Alpha=1.0) so transition to a viewport won't be noticeable.
|
// When using viewports it is recommended that your default value for ImGuiCol_WindowBg is opaque (Alpha=1.0) so transition to a viewport won't be noticeable.
|
||||||
ImGuiConfigFlags_ViewportsEnable = 1 << 10, // Viewport enable flags (require both ImGuiConfigFlags_PlatformHasViewports + ImGuiConfigFlags_RendererHasViewports set by the respective back-ends)
|
ImGuiConfigFlags_ViewportsEnable = 1 << 10, // Viewport enable flags (require both ImGuiBackendFlags_PlatformHasViewports + ImGuiBackendFlags_RendererHasViewports set by the respective back-ends)
|
||||||
ImGuiConfigFlags_DpiEnableScaleViewports= 1 << 14, // [BETA: Don't use] FIXME-DPI: Reposition and resize imgui windows when the DpiScale of a viewport changed (mostly useful for the main viewport hosting other window). Note that resizing the main window itself is up to your application.
|
ImGuiConfigFlags_DpiEnableScaleViewports= 1 << 14, // [BETA: Don't use] FIXME-DPI: Reposition and resize imgui windows when the DpiScale of a viewport changed (mostly useful for the main viewport hosting other window). Note that resizing the main window itself is up to your application.
|
||||||
ImGuiConfigFlags_DpiEnableScaleFonts = 1 << 15, // [BETA: Don't use] FIXME-DPI: Request bitmap-scaled fonts to match DpiScale. This is a very low-quality workaround. The correct way to handle DPI is _currently_ to replace the atlas and/or fonts in the Platform_OnChangedViewport callback, but this is all early work in progress.
|
ImGuiConfigFlags_DpiEnableScaleFonts = 1 << 15, // [BETA: Don't use] FIXME-DPI: Request bitmap-scaled fonts to match DpiScale. This is a very low-quality workaround. The correct way to handle DPI is _currently_ to replace the atlas and/or fonts in the Platform_OnChangedViewport callback, but this is all early work in progress.
|
||||||
|
|
||||||
|
@ -6885,6 +6885,7 @@ 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.
|
// 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)
|
if ((flags & ImGuiTabBarFlags_Reorderable) != (tab_bar->Flags & ImGuiTabBarFlags_Reorderable) && tab_bar->Tabs.Size > 1)
|
||||||
|
if ((flags & ImGuiTabBarFlags_DockNode) == 0)
|
||||||
ImQsort(tab_bar->Tabs.Data, tab_bar->Tabs.Size, sizeof(ImGuiTabItem), TabItemComparerByBeginOrder);
|
ImQsort(tab_bar->Tabs.Data, tab_bar->Tabs.Size, sizeof(ImGuiTabItem), TabItemComparerByBeginOrder);
|
||||||
|
|
||||||
// Flags
|
// Flags
|
||||||
|
Loading…
Reference in New Issue
Block a user