summaryrefslogtreecommitdiff
path: root/client/widgets/button.cc
diff options
context:
space:
mode:
authordeva <deva>2011-03-18 07:18:56 +0000
committerdeva <deva>2011-03-18 07:18:56 +0000
commit165afd0d36abc8729b28e303077ed285b577caea (patch)
treeb35787b28a2e7c9dedd96ebcdb1687425efc6e1e /client/widgets/button.cc
parent97d32901efc2b6cbec3ab41f78fa409d2ce78804 (diff)
Moved lua methods into their respective Qt widget implementation files.
Diffstat (limited to 'client/widgets/button.cc')
-rw-r--r--client/widgets/button.cc9
1 files changed, 5 insertions, 4 deletions
diff --git a/client/widgets/button.cc b/client/widgets/button.cc
index 42c4371..6ef6ac8 100644
--- a/client/widgets/button.cc
+++ b/client/widgets/button.cc
@@ -56,10 +56,11 @@ Button::Button(QDomNode &node, MacroWindow *macrowindow)
}
}
- connect(this, SIGNAL(act_commit()), macrowindow, SLOT(commit()));
- connect(this, SIGNAL(act_cancel()), macrowindow, SLOT(cancel()));
- connect(macrowindow, SIGNAL(macroHasChanged()), this, SLOT(do_enable()));
-
+ if(macrowindow) {
+ connect(this, SIGNAL(act_commit()), macrowindow, SLOT(commit()));
+ connect(this, SIGNAL(act_cancel()), macrowindow, SLOT(cancel()));
+ connect(macrowindow, SIGNAL(macroHasChanged()), this, SLOT(do_enable()));
+ }
}
Button::~Button()