Browse Source

Fixed change tool size with pixel perfect

Krzysztof Krysiński 7 months ago
parent
commit
5e7264a753
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/PixiEditor/ViewModels/SubViewModels/ToolsViewModel.cs

+ 1 - 1
src/PixiEditor/ViewModels/SubViewModels/ToolsViewModel.cs

@@ -344,7 +344,7 @@ internal class ToolsViewModel : SubViewModel<ViewModelMain>, IToolsHandler
         CanExecute = "PixiEditor.Tools.CanChangeToolSize", Key = Key.OemOpenBrackets, AnalyticsTrack = true)]
         CanExecute = "PixiEditor.Tools.CanChangeToolSize", Key = Key.OemOpenBrackets, AnalyticsTrack = true)]
     public void ChangeToolSize(double increment)
     public void ChangeToolSize(double increment)
     {
     {
-        if (ActiveTool?.Toolbar is not IToolSizeToolbar toolbar)
+        if (ActiveTool?.Toolbar is not IToolSizeToolbar toolbar || !CanChangeToolSize())
             return;
             return;
         double newSize = toolbar.ToolSize + increment;
         double newSize = toolbar.ToolSize + increment;
         if (newSize > 0)
         if (newSize > 0)