Skip to content

Commit

Permalink
Docking: fixed settings load issue when mouse wheeling. (#4310)
Browse files Browse the repository at this point in the history
  • Loading branch information
ocornut committed Aug 24, 2021
1 parent 6bd447c commit 58f5092
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
5 changes: 5 additions & 0 deletions docs/CHANGELOG.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
-----------------------------------------------------------------------
Expand Down
6 changes: 5 additions & 1 deletion imgui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 58f5092

Please sign in to comment.