Browse Source

Fix drawing not working with pixel perfect after undo

Equbuxu 3 years ago
parent
commit
2062c587be
1 changed files with 2 additions and 1 deletions
  1. 2 1
      PixiEditor/Models/Tools/Tools/PenTool.cs

+ 2 - 1
PixiEditor/Models/Tools/Tools/PenTool.cs

@@ -57,7 +57,8 @@ namespace PixiEditor.Models.Tools.Tools
         {
         {
             base.BeforeUse();
             base.BeforeUse();
             changedPixelsindex = 0;
             changedPixelsindex = 0;
-            lastChangedPixels = new Coordinates[3];
+            lastChangedPixels = new Coordinates[] { new(-1, -1), new(-1, -1), new(-1, -1) };
+            lastChangedPixel = new(-1, -1);
             confirmedPixels.Clear();
             confirmedPixels.Clear();
         }
         }