Sfoglia il codice sorgente

#295 Restore a tool when Space is released

#295 Restore a tool when Space is released
ouadsecond 3 anni fa
parent
commit
57dd18aaa1

+ 2 - 1
PixiEditor/ViewModels/SubViewModels/Main/ToolsViewModel.cs

@@ -176,7 +176,8 @@ namespace PixiEditor.ViewModels.SubViewModels.Main
         private void SetActiveTool(Type toolType)
         private void SetActiveTool(Type toolType)
         {
         {
             Tool foundTool = ToolSet.First(x => x.GetType() == toolType);
             Tool foundTool = ToolSet.First(x => x.GetType() == toolType);
-            SetActiveTool(foundTool);
+            if(ActiveTool != foundTool)//otherwise we would lost track of LastActionTool
+              SetActiveTool(foundTool);
         }
         }
 
 
         private void SetToolCursor(Type tool)
         private void SetToolCursor(Type tool)