Skip to content

Commit

Permalink
Save value as number after formatting.
Browse files Browse the repository at this point in the history
  • Loading branch information
Wetxius committed May 11, 2019
1 parent 666e99e commit 5d952f5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ShestakUI_Config/Core.lua
Expand Up @@ -165,7 +165,7 @@ end

local function onValueChanged(self, value)
if self.step < 1 then
value = string.format("%.2f", value)
value = tonumber(string.format("%.2f", value))
else
value = floor(value + 0.5)
end
Expand All @@ -179,7 +179,7 @@ local function onValueChanged(self, value)

if self.needsReload then
if self.step < 1 then
self.oldValue = string.format("%.2f", self.oldValue)
self.oldValue = tonumber(string.format("%.2f", self.oldValue))
end
old[self] = self.oldValue
checkIsReloadNeeded()
Expand Down

0 comments on commit 5d952f5

Please sign in to comment.