aboutsummaryrefslogtreecommitdiff
path: root/src/FbTk/MenuItem.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/FbTk/MenuItem.cc')
-rw-r--r--src/FbTk/MenuItem.cc2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/FbTk/MenuItem.cc b/src/FbTk/MenuItem.cc
index 2576d2b..7d309f4 100644
--- a/src/FbTk/MenuItem.cc
+++ b/src/FbTk/MenuItem.cc
@@ -35,6 +35,8 @@ namespace FbTk {
35 35
36void MenuItem::click(int button, int time) { 36void MenuItem::click(int button, int time) {
37 if (m_command.get() != 0) { 37 if (m_command.get() != 0) {
38 if (m_menu && m_close_on_click)
39 m_menu->hide();
38 // we need a local variable, since the command may destroy this object 40 // we need a local variable, since the command may destroy this object
39 RefCount<Command> tmp(m_command); 41 RefCount<Command> tmp(m_command);
40 tmp->execute(); 42 tmp->execute();