Fix problem with treeview keeping the editor busy

Fix a problem introduced when fixing the dirty pixel problem, commit
cb08c5c. The node, when determining the layout was rounding the size
of the fixed-size view. In turns this latter was calling move_towards
to the default_size it wanted. If default_size was non-integer the
value vas never archieved because it was rounded during layout and
move_towars was keeping the editor busy by setting the
core.need_redraw flag.
This commit is contained in:
Francesco Abbate
2021-10-21 23:18:31 +02:00
parent f18ac849fb
commit 167e41de65
2 changed files with 7 additions and 1 deletions
+2
View File
@@ -238,6 +238,8 @@ function TreeView:update()
if self.init_size then
self.size.x = dest
self.init_size = false
else
self:move_towards(self.size, "x", dest)
end
local duration = system.get_time() - self.tooltip.begin