node: limit bounding rect when detecting node collisions

Hopefully prevents the possibility of an infinite loop.
This commit is contained in:
itsmattkc
2021-04-11 12:20:50 +10:00
parent ad59d09193
commit 700b56d43f
+1 -1
View File
@@ -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()) {