aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/Tango.Touch/Controls
diff options
context:
space:
mode:
authorVictoria Plitt <Victoria.Plitt@twine-s.com>2023-04-18 14:47:53 +0300
committerVictoria Plitt <Victoria.Plitt@twine-s.com>2023-04-18 14:47:53 +0300
commit1c7f16c34f85dd65a02ad08dde984f04a4d82b83 (patch)
tree74fb71b0959d1c7c1b9f09fdd636b3196b43aaf4 /Software/Visual_Studio/Tango.Touch/Controls
parent7c7d1078082c261c820297cb6e4e5cf301872e4f (diff)
downloadTango-1c7f16c34f85dd65a02ad08dde984f04a4d82b83.tar.gz
Tango-1c7f16c34f85dd65a02ad08dde984f04a4d82b83.zip
PPC Eureka. Power button, new dialog.
Diffstat (limited to 'Software/Visual_Studio/Tango.Touch/Controls')
-rw-r--r--Software/Visual_Studio/Tango.Touch/Controls/TouchNumericTextBox.cs3
1 files changed, 2 insertions, 1 deletions
diff --git a/Software/Visual_Studio/Tango.Touch/Controls/TouchNumericTextBox.cs b/Software/Visual_Studio/Tango.Touch/Controls/TouchNumericTextBox.cs
index 47b3670a7..6c09cdc59 100644
--- a/Software/Visual_Studio/Tango.Touch/Controls/TouchNumericTextBox.cs
+++ b/Software/Visual_Studio/Tango.Touch/Controls/TouchNumericTextBox.cs
@@ -211,7 +211,8 @@ namespace Tango.Touch.Controls
}
if (Step > 0)
{
- value = Math.Round(value / Step, MidpointRounding.AwayFromZero) * Step;
+ int coef = (int)((value + Step - 1) / Step);
+ value = coef * Step;
}
if(Minimum > 0 && value < Minimum)
{