Skip to content

Commit

Permalink
Fix infinite floodfill loop when filling with transparent color (fix #…
Browse files Browse the repository at this point in the history
…580). This is not the ideal fix since floodfill should eventually support the 'overwrite' mode, but for now it doesn't support it anyway
  • Loading branch information
Equbuxu committed Dec 2, 2023
1 parent 1c9def3 commit 56ef83b
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ internal static FloodFillChunkCache CreateCache(HashSet<Guid> membersToFloodFill
static (EmptyChunk _) => Colors.Transparent
);

if ((colorToReplace.A == 0 && drawingColor.A == 0) || colorToReplace == drawingColor)
if ((drawingColor.A == 0) || colorToReplace == drawingColor)
return new();

RectI globalSelectionBounds = (RectI?)selection?.TightBounds ?? new RectI(VecI.Zero, document.Size);
Expand Down

0 comments on commit 56ef83b

Please sign in to comment.