Fix node graph moves after focusing on another window which above a node.

This commit is contained in:
LuChiChick 2026-05-20 16:25:59 +08:00
parent 5cc61e9486
commit 8cdd2662ba

View File

@ -578,7 +578,8 @@ void BeginNodeSelection(ImNodesEditorContext& editor, const int node_idx)
// Don't start selecting a node if we are e.g. already creating and dragging
// a new link! New link creation can happen when the mouse is clicked over
// a node, but within the hover radius of a pin.
if (editor.ClickInteraction.Type != ImNodesClickInteractionType_None)
if (editor.ClickInteraction.Type != ImNodesClickInteractionType_None ||
!ImGui::IsWindowHovered())
{
return;
}