Browse Source

NumberInput mouse dragging now rounds to max 2 decimals

flabbet 1 year ago
parent
commit
81b947bb8c
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/PixiEditor/Views/Input/NumberInput.cs

+ 1 - 1
src/PixiEditor/Views/Input/NumberInput.cs

@@ -214,7 +214,7 @@ internal partial class NumberInput : TextBox
             double pixelsPerUnit = 5;
 
             double newValue = _pressedValue + diff / pixelsPerUnit;
-            newValue = Math.Round(newValue, Decimals);
+            newValue = Math.Round(newValue, Math.Min(Decimals, 2));
             Value = newValue;
             e.Handled = true;
         }