Skip to content

Commit

Permalink
Fixed magic wand tool single layer mode
Browse files Browse the repository at this point in the history
  • Loading branch information
flabbet committed Dec 3, 2021
1 parent 722ebcc commit 34a142f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion PixiEditor/Models/ImageManipulation/ToolCalculator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ public static void GetLinearFillAbsolute(Layer layer, Coordinates startingCoords
}
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));

Expand Down
1 change: 1 addition & 0 deletions PixiEditor/Models/Tools/Tools/MagicWandTool.cs
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ public override void OnRecordingLeftMouseDown(MouseEventArgs e)

Selection selection = BitmapManager.ActiveDocument.ActiveSelection;


newSelection.Clear();

ToolCalculator.GetLinearFillAbsolute(
Expand Down

0 comments on commit 34a142f

Please sign in to comment.