Ver Fonte

Fix infinite floodfill loop when filling with transparent color (fix #580). This is not the ideal fix since floodfill should eventually support the 'overwrite' mode, but for now it doesn't support it anyway

Equbuxu há 1 ano atrás
pai
commit
56ef83b32f

+ 1 - 1
src/PixiEditor.ChangeableDocument/Changes/Drawing/FloodFill/FloodFillHelper.cs

@@ -53,7 +53,7 @@ public static class FloodFillHelper
             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);