From 7f7e8eeecd4d4726aae20d2238a7c92bc2b4d617 Mon Sep 17 00:00:00 2001 From: omar Date: Thu, 3 Jan 2019 22:11:14 +0100 Subject: [PATCH] Docking: Fixed a bug undocking a window from its tab when it is the only docked window of a root dockspace with ConfigDockingTabBarOnSingleWindows enabled. --- imgui_widgets.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/imgui_widgets.cpp b/imgui_widgets.cpp index 2d1fab21..127e1df3 100644 --- a/imgui_widgets.cpp +++ b/imgui_widgets.cpp @@ -6479,8 +6479,8 @@ bool ImGui::TabItemEx(ImGuiTabBar* tab_bar, const char* label, bool* p_open, // FIXME-DOCK: In theory we shouldn't test for the ConfigDockingNodifySingleWindows flag here. // When our single window node and OnlyNodeWithWindows are working properly we may remove this check here. ImGuiDockNode* node = docked_window ? docked_window->DockNode : NULL; - const bool single_window_node = node && node->IsRootNode() && node->Windows.Size == 1 && g.IO.ConfigDockingTabBarOnSingleWindows; - if (held && single_window_node && IsMouseDragging(0, 0.0f)) + const bool single_floating_window_node = node && node->IsRootNode() && !node->IsDockSpace && node->Windows.Size == 1 && g.IO.ConfigDockingTabBarOnSingleWindows; + if (held && single_floating_window_node && IsMouseDragging(0, 0.0f)) { // Move StartMouseMovingWindow(docked_window);