Browse Source

#295 Restore a tool when Space is released

#295 Restore a tool when Space is released
ouadsecond 3 years ago
parent
commit
57dd18aaa1
1 changed files with 2 additions and 1 deletions
  1. 2 1
      PixiEditor/ViewModels/SubViewModels/Main/ToolsViewModel.cs

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

@@ -176,7 +176,8 @@ namespace PixiEditor.ViewModels.SubViewModels.Main
         private void SetActiveTool(Type 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)