Browse Source

Fixed blue fill with ctrl t

Krzysztof Krysiński 2 months ago
parent
commit
2c03edd245
1 changed files with 19 additions and 1 deletions
  1. 19 1
      src/PixiEditor/Views/Main/ViewportControls/ViewportOverlays.cs

+ 19 - 1
src/PixiEditor/Views/Main/ViewportControls/ViewportOverlays.cs

@@ -140,7 +140,7 @@ internal class ViewportOverlays
 
 
     private void BindSelectionOverlay()
     private void BindSelectionOverlay()
     {
     {
-        Binding showFillBinding = new()
+        Binding toolIsSelectionBinding = new()
         {
         {
             Source = ViewModelMain.Current,
             Source = ViewModelMain.Current,
             Path = "ToolsSubViewModel.ActiveTool",
             Path = "ToolsSubViewModel.ActiveTool",
@@ -148,6 +148,24 @@ internal class ViewportOverlays
             Mode = BindingMode.OneWay
             Mode = BindingMode.OneWay
         };
         };
 
 
+        Binding isTransformingBinding = new()
+        {
+            Source = Viewport,
+            Path = "!Document.TransformViewModel.TransformActive",
+            Mode = BindingMode.OneWay
+        };
+
+        MultiBinding showFillBinding = new()
+        {
+            Converter = new AllTrueConverter(),
+            Mode = BindingMode.OneWay,
+            Bindings = new List<IBinding>()
+            {
+                toolIsSelectionBinding,
+                isTransformingBinding
+            }
+        };
+
         Binding pathBinding = new()
         Binding pathBinding = new()
         {
         {
             Source = Viewport, Path = "Document.SelectionPathBindable", Mode = BindingMode.OneWay
             Source = Viewport, Path = "Document.SelectionPathBindable", Mode = BindingMode.OneWay