Skip to content

Commit 80a7f2c

Browse files
committed
New Lua bindings more picky about argument types (a float is a float,
an int is an int).
1 parent f3204ce commit 80a7f2c

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

lib/autogui_handlers.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -832,7 +832,7 @@ autogui.handlers.slider_int = function(
832832
local sel,val
833833
sel,val = imgui.SliderInt(
834834
autogui.remove_underscores(property_name),
835-
object[property_name], min, max, '%d'
835+
math.floor(object[property_name]), min, max, '%d'
836836
)
837837
if sel then
838838
object[property_name] = val

lib/histogram.lua

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -126,9 +126,9 @@ function Stats.update()
126126

127127
Stats.attrib = object.I.Editor.find_attribute(container_attrib_name)
128128
if Stats.attrib == nil then
129-
Stats.reset()
130-
shd.attribute = 'vertices.point[0]'
131-
return
129+
Stats.reset()
130+
shd.attribute = 'vertices.point[0]'
131+
return
132132
end
133133

134134
local f = tostring(shd.colormap):split(';')

0 commit comments

Comments
 (0)