Browse Source

Fixed magic wand tool single layer mode

flabbet 3 years ago
parent
commit
34a142fff6

+ 1 - 1
PixiEditor/Models/ImageManipulation/ToolCalculator.cs

@@ -156,7 +156,7 @@ namespace PixiEditor.Models.ImageManipulation
             }
             int lastCheckedPixelRight = fillXRight - 1;
 
-            int relativeY = coords.Y - layer.OffsetY;
+            int relativeY = coords.Y;
             LineTool.CalculateBresenhamLine(new Coordinates(lastCheckedPixelLeft, relativeY), new Coordinates(lastCheckedPixelRight, relativeY), output);
             dirtyRect = dirtyRect.Expand(new Int32Rect(lastCheckedPixelLeft, coords.Y, lastCheckedPixelRight - lastCheckedPixelLeft + 1, 1));
 

+ 1 - 0
PixiEditor/Models/Tools/Tools/MagicWandTool.cs

@@ -55,6 +55,7 @@ namespace PixiEditor.Models.Tools.Tools
 
             Selection selection = BitmapManager.ActiveDocument.ActiveSelection;
 
+
             newSelection.Clear();
 
             ToolCalculator.GetLinearFillAbsolute(