Skip to content

"QueryDeletedNode" clears node settings regardless of calling AcceptDeletedItem/RejectDeletedItem #178

@MultiPain

Description

@MultiPain

If you have an empty loop:

NodeEditor::NodeId nodeID;
while (NodeEditor::QueryDeletedNode(&nodeID))
{
}

then when you try to delete a node, it will be moved to (0; 0)

similarly if you have something like this:

NodeEditor::NodeId nodeID;
while (NodeEditor::QueryDeletedNode(&nodeID))
{
   auto node = getNode(nodeID);
   if (node->isLocked())
   {
      NodeEditor::RejectDeletedItem();
   }
   else
   {
      if (NodeEditor::AcceptDeletedItem()) { /*...*/ }
   }
}

The problem is here:

Editor->RemoveSettings(item);
item->m_DeleteOnNewFrame = true;

in ed::DeleteItemsAction::RejectItem:

RemoveItem(deleteDependencies);

and

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions