From 4e93654aa548d4a2007bf47c9ebedf49af67f6b7 Mon Sep 17 00:00:00 2001 From: Emmanuel Lepage Vallee Date: Tue, 31 Dec 2013 16:13:11 -0500 Subject: [PATCH] Fix right click in embeded menus --- base.lua | 1 + embed.lua | 1 + 2 files changed, 2 insertions(+) diff --git a/base.lua b/base.lua index 1997392..f8aa284 100644 --- a/base.lua +++ b/base.lua @@ -215,6 +215,7 @@ end local function add_embeded_menu(data,menu) add_widget(data,menu._internal.layout) + menu._embeded_parent = data end diff --git a/embed.lua b/embed.lua index 58f6e75..afea6a2 100644 --- a/embed.lua +++ b/embed.lua @@ -21,6 +21,7 @@ local function setup_drawable(data) local internal = data._internal local get_map,set_map,private_data = internal.get_map,internal.set_map,internal.private_data get_map.visible = function() return true end --Let the parent handle that + set_map.visible = function(v) if data._embeded_parent then data._embeded_parent.visible = v end end if not data.layout then data.layout = layout.vertical end