summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPixel <pixel@nobis-crew.org>2009-12-19 20:44:37 -0800
committerPixel <pixel@nobis-crew.org>2009-12-19 20:44:37 -0800
commitde77b17f6a1ec46f9e9386e604d138152108e708 (patch)
tree7df137f811b2a8e743b5a85b43669982466f09b9
parent9ce69b6bc34655e437feccd89354730c91e5677b (diff)
Fixing "getting out of focus" double clic.
Properly allowing objects to overload their :draw method.
-rw-r--r--dalos.lua4
1 files 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,