mirror of
https://github.com/Drezil/imgui.git
synced 2024-11-15 09:27:00 +00:00
Fixed a PVS Studio static analyzer warning.
This commit is contained in:
parent
835a8b2c9b
commit
b668726a38
@ -11524,8 +11524,9 @@ void ImGui::DockContextProcessDock(ImGuiContext* ctx, ImGuiDockRequest* req)
|
|||||||
// Central node property needs to be moved to a leaf node, pick the last focused one.
|
// Central node property needs to be moved to a leaf node, pick the last focused one.
|
||||||
// FIXME-DOCKING: If we had to transfer other flags here, what would the policy be?
|
// FIXME-DOCKING: If we had to transfer other flags here, what would the policy be?
|
||||||
ImGuiDockNode* last_focused_node = DockContextFindNodeByID(ctx, payload_node->LastFocusedNodeID);
|
ImGuiDockNode* last_focused_node = DockContextFindNodeByID(ctx, payload_node->LastFocusedNodeID);
|
||||||
|
IM_ASSERT(last_focused_node != NULL);
|
||||||
ImGuiDockNode* last_focused_root_node = DockNodeGetRootNode(last_focused_node);
|
ImGuiDockNode* last_focused_root_node = DockNodeGetRootNode(last_focused_node);
|
||||||
IM_ASSERT(last_focused_node != NULL && last_focused_root_node == DockNodeGetRootNode(payload_node));
|
IM_ASSERT(last_focused_root_node == DockNodeGetRootNode(payload_node));
|
||||||
last_focused_node->LocalFlags |= ImGuiDockNodeFlags_CentralNode;
|
last_focused_node->LocalFlags |= ImGuiDockNodeFlags_CentralNode;
|
||||||
node->LocalFlags &= ~ImGuiDockNodeFlags_CentralNode;
|
node->LocalFlags &= ~ImGuiDockNodeFlags_CentralNode;
|
||||||
last_focused_root_node->CentralNode = last_focused_node;
|
last_focused_root_node->CentralNode = last_focused_node;
|
||||||
|
Loading…
Reference in New Issue
Block a user