Browse Source

Improved number input mouse dragging (rounds to decimals now)

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

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

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