From 700b56d43f458c293182cd8be8f230f48293b7ee Mon Sep 17 00:00:00 2001 From: itsmattkc Date: Sun, 11 Apr 2021 12:20:50 +1000 Subject: [PATCH] node: limit bounding rect when detecting node collisions Hopefully prevents the possibility of an infinite loop. --- app/node/node.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/node/node.cpp b/app/node/node.cpp index 65dbe09f6..da1359e15 100644 --- a/app/node/node.cpp +++ b/app/node/node.cpp @@ -2279,7 +2279,7 @@ void NodeSetPositionAndShiftSurroundingsCommand::redo() commands_.append(set_pos_command); // Get bounding rect - QRectF bounding_rect(position_.x() - 0.5, position_.y() - 0.5, 1, 1); + QRectF bounding_rect(position_.x() - 0.45, position_.y() - 0.45, 0.9, 0.9); // Start moving other nodes foreach (Node* surrounding, node_->parent()->nodes()) {