ソースを参照

Dont add second undo if no pixel was selected

CPKreuz 4 年 前
コミット
3732392d23
1 ファイル変更1 行追加1 行削除
  1. 1 1
      PixiEditor/Models/Tools/Tools/SelectTool.cs

+ 1 - 1
PixiEditor/Models/Tools/Tools/SelectTool.cs

@@ -46,7 +46,7 @@ namespace PixiEditor.Models.Tools.Tools
                 ActiveSelection.Clear();
                 ActiveSelection.Clear();
             }
             }
 
 
-            if (SelectionType == SelectionType.New)
+            if (SelectionType == SelectionType.New && ActiveSelection.SelectedPoints.Count != 0)
             {
             {
                 // Add empty selection as the old one get's fully deleted first
                 // Add empty selection as the old one get's fully deleted first
                 ViewModelMain.Current.BitmapManager.ActiveDocument.UndoManager.AddUndoChange(
                 ViewModelMain.Current.BitmapManager.ActiveDocument.UndoManager.AddUndoChange(