diff --git a/app/widget/nodeview/nodeview.cpp b/app/widget/nodeview/nodeview.cpp index f307a3201..a6f6c3f9f 100644 --- a/app/widget/nodeview/nodeview.cpp +++ b/app/widget/nodeview/nodeview.cpp @@ -407,11 +407,16 @@ void NodeView::mouseMoveEvent(QMouseEvent *event) // Find if the cursor is currently inside an item NodeViewItem* item_at_cursor = dynamic_cast(itemAt(event->pos())); - // Filter out connecting to self1 + // Filter out connecting to self if (item_at_cursor == create_edge_src_) { item_at_cursor = nullptr; } + // Filter out connecting to a node that connects to us + if (item_at_cursor && item_at_cursor->GetNode()->OutputsTo(create_edge_src_->GetNode(), true)) { + item_at_cursor = nullptr; + } + // If the item has changed if (item_at_cursor != create_edge_dst_) { // If we had a destination active, disconnect from it since the item has changed