summaryrefslogtreecommitdiff
path: root/client/macro.cc
diff options
context:
space:
mode:
Diffstat (limited to 'client/macro.cc')
-rw-r--r--client/macro.cc11
1 files changed, 7 insertions, 4 deletions
diff --git a/client/macro.cc b/client/macro.cc
index 0037044..3994a42 100644
--- a/client/macro.cc
+++ b/client/macro.cc
@@ -38,7 +38,8 @@
Macro::Macro(QDomNode &n)
{
window = NULL;
-
+ drawer = NULL;
+
update(n);
}
@@ -93,7 +94,7 @@ void Macro::init(QBoxLayout *layout, Macros &macros,
}
// if(macros.find(name) == macros.end()) {
- if(window == NULL) {
+ if(window == NULL && drawer == NULL) {
window = new MacroWindow(netcom, node, templ, !isstatic, iscompact);
/*
@@ -107,9 +108,11 @@ void Macro::init(QBoxLayout *layout, Macros &macros,
layout->addWidget(edge);
*/
- drawer = new MacroDrawer(this, xml_elem.attribute("caption", name), NULL/*edge*/);
+ drawer = new MacroDrawer(this, xml_elem.attribute("caption", name),
+ NULL/*edge*/);
drawer->connect(drawer, SIGNAL(toggle()), window, SLOT(toggleMacro()));
- drawer->connect(window, SIGNAL(activationChanged(bool)), drawer, SLOT(activationChange(bool)));
+ drawer->connect(window, SIGNAL(activationChanged(bool)), drawer,
+ SLOT(activationChange(bool)));
//drawer->setAutoFillBackground(true);
//drawer->setContentsMargins(1,1,1,1);
window->setActive(false);