Browse Source

Fixed selection bitmap not resizing with the rest

flabbet 5 years ago
parent
commit
06eda7325f
1 changed files with 5 additions and 2 deletions
  1. 5 2
      PixiEditor/ViewModels/ViewModelMain.cs

+ 5 - 2
PixiEditor/ViewModels/ViewModelMain.cs

@@ -236,8 +236,11 @@ namespace PixiEditor.ViewModels
 
 
         public void ClipCanvas(object parameter)
         public void ClipCanvas(object parameter)
         {
         {
-            if(BitmapManager.ActiveDocument != null)
+            if (BitmapManager.ActiveDocument != null)
+            {
                 BitmapManager.ActiveDocument.ClipCanvas();
                 BitmapManager.ActiveDocument.ClipCanvas();
+                ActiveSelection = new Selection(Array.Empty<Coordinates>());
+            }
         }
         }
 
 
         public void Duplicate(object parameter)
         public void Duplicate(object parameter)
@@ -292,7 +295,7 @@ namespace PixiEditor.ViewModels
 
 
         private bool SelectionIsNotEmpty(object property)
         private bool SelectionIsNotEmpty(object property)
         {
         {
-            return ActiveSelection != null && ActiveSelection.SelectedPoints != null;
+            return ActiveSelection != null && ActiveSelection.SelectedPoints != null && ActiveSelection.SelectedPoints.Count > 0;
         }
         }
 
 
         public void SetTool(object parameter)
         public void SetTool(object parameter)