From 56194c7efb4a89f2a7154f3e78585cb5f76459da Mon Sep 17 00:00:00 2001 From: alcomposer Date: Fri, 27 Oct 2023 13:47:04 +1030 Subject: [PATCH] reconnect the enable snapping button in UI --- Source/ObjectGrid.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Source/ObjectGrid.cpp b/Source/ObjectGrid.cpp index 78ad4925b..64c8b8e2c 100644 --- a/Source/ObjectGrid.cpp +++ b/Source/ObjectGrid.cpp @@ -67,7 +67,7 @@ void ObjectGrid::propertyChanged(String const& name, var const& value) Point ObjectGrid::performMove(Object* toDrag, Point dragOffset) { - if (ModifierKeys::getCurrentModifiers().isShiftDown() || gridType == 0) { + if (ModifierKeys::getCurrentModifiers().isShiftDown() || gridType == 0 || !gridEnabled) { clearIndicators(); return dragOffset; } @@ -201,7 +201,7 @@ Point ObjectGrid::performMove(Object* toDrag, Point dragOffset) Point ObjectGrid::performResize(Object* toDrag, Point dragOffset, Rectangle newResizeBounds) { - if (ModifierKeys::getCurrentModifiers().isShiftDown() || gridType == 0) { + if (ModifierKeys::getCurrentModifiers().isShiftDown() || gridType == 0 || !gridEnabled) { clearIndicators(); return dragOffset; }