Docking: VisibleWindow of a node spread its _NoMove attribute to the node (fixed dragging or undocking of dock node host from collapse button). (#2325, #2109)

This commit is contained in:
omar
2019-01-31 15:22:40 +01:00
parent 5536edede9
commit dc8ff68871
2 changed files with 12 additions and 3 deletions

View File

@ -712,7 +712,7 @@ bool ImGui::CollapseButton(ImGuiID id, const ImVec2& pos, ImGuiDockNode* dock_no
if (IsItemActive() && IsMouseDragging(0))
{
bool can_extract_dock_node = false;
if (dock_node != NULL)
if (dock_node != NULL && dock_node->VisibleWindow && !(dock_node->VisibleWindow->Flags & ImGuiWindowFlags_NoMove))
{
ImGuiDockNode* root_node = DockNodeGetRootNode(dock_node);
if (root_node->OnlyNodeWithWindows != dock_node || (root_node->CentralNode != NULL))