Browse Source

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

Co-authored-by: Krzysztof Krysiński <[email protected]>
Bartłomiej Rogowski 4 years ago
parent
commit
f5e6d88409
1 changed files with 3 additions and 3 deletions
  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);
         }
     }
-}
+}