From 58f5092c53dd7c3208d7ca717c861325616f58b0 Mon Sep 17 00:00:00 2001 From: ocornut Date: Tue, 24 Aug 2021 20:33:00 +0200 Subject: [PATCH] Docking: fixed settings load issue when mouse wheeling. (#4310) --- docs/CHANGELOG.txt | 5 +++++ imgui.cpp | 6 +++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/docs/CHANGELOG.txt b/docs/CHANGELOG.txt index 62fbe7743762..3f106c219703 100644 --- a/docs/CHANGELOG.txt +++ b/docs/CHANGELOG.txt @@ -99,6 +99,11 @@ Other changes: Note that Linux/Mac still have inconsistent support for multi-viewports. If you want to help see https://github.com/ocornut/imgui/issues/2117. +Docking+Viewports Branch: + +- Docking: fixed settings load issue when mouse wheeling. (#4310) + + ----------------------------------------------------------------------- VERSION 1.84.1 (Released 2021-08-20) ----------------------------------------------------------------------- diff --git a/imgui.cpp b/imgui.cpp index bc1616e4e063..bc425d79d28c 100644 --- a/imgui.cpp +++ b/imgui.cpp @@ -13111,7 +13111,10 @@ void ImGui::DockContextProcessUndockNode(ImGuiContext* ctx, ImGuiDockNode* node) DockNodeMoveWindows(new_node, node); DockSettingsRenameNodeReferences(node->ID, new_node->ID); for (int n = 0; n < new_node->Windows.Size; n++) + { + new_node->Windows[n]->Flags &= ~ImGuiWindowFlags_ChildWindow; UpdateWindowParentAndRootLinks(new_node->Windows[n], new_node->Windows[n]->Flags, NULL); + } node = new_node; } else @@ -13293,7 +13296,8 @@ static void ImGui::DockNodeRemoveWindow(ImGuiDockNode* node, ImGuiWindow* window window->DockNode = NULL; window->DockIsActive = window->DockTabWantClose = false; window->DockId = save_dock_id; - UpdateWindowParentAndRootLinks(window, window->Flags & ~ImGuiWindowFlags_ChildWindow, NULL); // Update immediately + window->Flags &= ~ImGuiWindowFlags_ChildWindow; + UpdateWindowParentAndRootLinks(window, window->Flags, NULL); // Update immediately // Remove window bool erased = false;