소스 검색

Clear Selection

Clear selection when only one point has been selected.
Polar 5 년 전
부모
커밋
7820d00d75
1개의 변경된 파일6개의 추가작업 그리고 0개의 파일을 삭제
  1. 6 0
      PixiEditor/Models/Tools/Tools/SelectTool.cs

+ 6 - 0
PixiEditor/Models/Tools/Tools/SelectTool.cs

@@ -37,6 +37,12 @@ namespace PixiEditor.Models.Tools.Tools
 
         public override void OnMouseUp(MouseEventArgs e)
         {
+            if (ViewModelMain.Current.ActiveSelection.SelectedPoints.Count() <= 1)
+            {
+                // If we have not selected multiple points, clear the selection
+                ViewModelMain.Current.ActiveSelection.Clear();
+            }
+
             UndoManager.AddUndoChange(new Change("ActiveSelection", _oldSelection,
                 ViewModelMain.Current.ActiveSelection, "Select pixels"));
         }