diff options
author | deva <deva> | 2010-08-17 07:22:38 +0000 |
---|---|---|
committer | deva <deva> | 2010-08-17 07:22:38 +0000 |
commit | 5f591bf81f626e9ac4bd47641662bfddda0ef9b4 (patch) | |
tree | d7393b5c55bede3ef204c3f8e241301234af728e | |
parent | fd7451d278d4d90afd185e7f7418d89cbcc5ba3d (diff) |
Add extra pointercheck.
-rw-r--r-- | client/macro.cc | 11 |
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 ¯os, } // 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 ¯os, 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); |