nodeview: only remove dragged edge if arrow was dragged
This commit is contained in:
@@ -566,7 +566,9 @@ void NodeView::mouseReleaseEvent(QMouseEvent *event)
|
||||
MultiUndoCommand* command = new MultiUndoCommand();
|
||||
|
||||
if (create_edge_already_exists_) {
|
||||
command->add_child(new NodeEdgeRemoveCommand(create_edge_->output(), create_edge_->input()));
|
||||
if (!create_edge_->IsConnected()) {
|
||||
command->add_child(new NodeEdgeRemoveCommand(create_edge_->output(), create_edge_->input()));
|
||||
}
|
||||
} else {
|
||||
delete create_edge_;
|
||||
}
|
||||
|
||||
@@ -89,6 +89,11 @@ public:
|
||||
*/
|
||||
void SetConnected(bool c);
|
||||
|
||||
bool IsConnected() const
|
||||
{
|
||||
return connected_;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Set highlighted state
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user