diff --git a/CHANGELOG.md b/CHANGELOG.md index 338ee58b..05079a38 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,7 @@ > - Fixed PendingConnection.PreviewTarget not being set to null when there is no actual target > - Fixed connectors panel not being affected by Node.VerticalAlignment > - Changing BorderThickness causes layout shift when selecting an item container +> - Fixed the unintentional movement caused by snapping correction #### **Version 5.0.2** diff --git a/Nodify/Helpers/DraggingOptimized.cs b/Nodify/Helpers/DraggingOptimized.cs index 6f42540e..4493a9a5 100644 --- a/Nodify/Helpers/DraggingOptimized.cs +++ b/Nodify/Helpers/DraggingOptimized.cs @@ -46,7 +46,7 @@ public void End(Vector change) Point result = container.Location + new Vector(r.X, r.Y); // Correct the final position - if (NodifyEditor.EnableSnappingCorrection) + if (NodifyEditor.EnableSnappingCorrection && (r.X != 0 || r.Y != 0)) { result.X = (int)result.X / _editor.GridCellSize * _editor.GridCellSize; result.Y = (int)result.Y / _editor.GridCellSize * _editor.GridCellSize;