[plugin/scale] fixed wrong increase and decrease

If the user manually set the desired scale by calling scale.set(1.60)
the scale_level was not set accordingly which meant that later doing
a Scale:Increase/Decrease command yielded incorrect scale amount.
This commit is contained in:
jgmdev 2021-06-17 20:58:22 -04:00
parent 5151e36981
commit e9e1214e59
1 changed files with 7 additions and 4 deletions

View File

@ -32,6 +32,9 @@ local function set_scale(scale)
local s = scale / current_scale local s = scale / current_scale
current_scale = scale current_scale = scale
-- we set scale_level in case this was called by user
scale_level = (scale - default_scale) / scale_steps
if config.scale_mode == "ui" then if config.scale_mode == "ui" then
SCALE = scale SCALE = scale