From de77b17f6a1ec46f9e9386e604d138152108e708 Mon Sep 17 00:00:00 2001 From: Pixel Date: Sat, 19 Dec 2009 20:44:37 -0800 Subject: Fixing "getting out of focus" double clic. Properly allowing objects to overload their :draw method. --- dalos.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dalos.lua b/dalos.lua index d5dfe85..4e61c2e 100644 --- a/dalos.lua +++ b/dalos.lua @@ -187,7 +187,7 @@ dalosp.canvas = { end, focus_cb = function (self, focus) - if focus == 0 then self:button_cb() end + if focus == 0 and not self.stateful.rghtbutton and not self.stateful.leftbutton then self:button_cb() end end, stypes = { @@ -602,7 +602,7 @@ dalosp.object = { end end local obj = { - draw = dalosp.object.default_draw, + draw = tab.draw or dalosp.object.default_draw, name = tab.name or "NoName", color = tab.color or cd.GRAY, ninputs = tab.ninputs or 0, -- cgit v1.2.3