Explorar o código

Update PixiEditor/Models/Tools/Tools/FloodFill.cs

Co-authored-by: Krzysztof Krysiński <[email protected]>
Bartłomiej Rogowski %!s(int64=5) %!d(string=hai) anos
pai
achega
f5e6d88409
Modificáronse 1 ficheiros con 3 adicións e 3 borrados
  1. 3 3
      PixiEditor/Models/Tools/Tools/FloodFill.cs

+ 3 - 3
PixiEditor/Models/Tools/Tools/FloodFill.cs

@@ -24,8 +24,8 @@ namespace PixiEditor.Models.Tools.Tools
         {
             List<Coordinates> changedCoords = new List<Coordinates>();
 
-            int width = layer.Width;
-            int height = layer.Height;
+            int width = ViewModelMain.Current.BitmapManager.ActiveDocument.Width;
+            int height = ViewModelMain.Current.BitmapManager.ActiveDocument.Height;
 
             var visited = new bool[width, height];
 
@@ -58,4 +58,4 @@ namespace PixiEditor.Models.Tools.Tools
             return BitmapPixelChanges.FromSingleColoredArray(changedCoords, newColor);
         }
     }
-}
+}