aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--data/plugins/treeview.lua5
1 files changed, 5 insertions, 0 deletions
diff --git a/data/plugins/treeview.lua b/data/plugins/treeview.lua
index 6841586d..e12782b6 100644
--- a/data/plugins/treeview.lua
+++ b/data/plugins/treeview.lua
@@ -186,6 +186,7 @@ end
function TreeView:on_mouse_moved(px, py, ...)
+ if not self.visible then return end
TreeView.super.on_mouse_moved(self, px, py, ...)
if self.dragging_scrollbar then return end
@@ -223,6 +224,7 @@ end
function TreeView:on_mouse_pressed(button, x, y, clicks)
+ if not self.visible then return end
local caught = TreeView.super.on_mouse_pressed(self, button, x, y, clicks)
if caught or button ~= "left" then
return true
@@ -263,6 +265,8 @@ function TreeView:update()
self:move_towards(self.size, "x", dest)
end
+ if not self.visible then return end
+
local duration = system.get_time() - self.tooltip.begin
if self.hovered_item and self.tooltip.x and duration > tooltip_delay then
self:move_towards(self.tooltip, "alpha", tooltip_alpha, tooltip_alpha_rate)
@@ -372,6 +376,7 @@ end
function TreeView:draw()
+ if not self.visible then return end
self:draw_background(style.background2)
local _y, _h = self.position.y, self.size.y