diff options
author | deva <deva> | 2011-04-12 10:09:07 +0000 |
---|---|---|
committer | deva <deva> | 2011-04-12 10:09:07 +0000 |
commit | cb6c72436d96cc85d3442aeaf25ead4245420f8d (patch) | |
tree | 43d5a3d88f10bc2665efe8437bd64e1733bbb762 /client | |
parent | a476471aad6d6ad48d13d4f05b3e83cdfaea09ab (diff) |
Bugfix: Hide header and expand button if macro is static.
Diffstat (limited to 'client')
-rw-r--r-- | client/macro.cc | 23 |
1 files changed, 11 insertions, 12 deletions
diff --git a/client/macro.cc b/client/macro.cc index 0dcf590..d6be5cc 100644 --- a/client/macro.cc +++ b/client/macro.cc @@ -60,22 +60,21 @@ void Macro::update(QDomNode &node) name = elem.attribute("name"); iscompleted = elem.attribute("completed", "false") == "true"; + isstatic = elem.attribute("static", "false") == "true"; + iscompact = elem.attribute("compact", "false") == "true"; if(drawer == NULL) { drawer = new MacroDrawer(this, elem.attribute("caption", name)); - if(window == NULL) { - isstatic = elem.attribute("static", "false") == "true"; - iscompact = elem.attribute("compact", "false") == "true"; - - window = new MacroWindow(netcom, templ, isstatic, iscompact, - scrollarea, drawer); - - QFont f = window->font(); - f.setBold(false); - f.setItalic(false); - window->setFont(f); - } + if(window == NULL) { + window = new MacroWindow(netcom, templ, isstatic, iscompact, + scrollarea, drawer); + + QFont f = window->font(); + f.setBold(false); + f.setItalic(false); + window->setFont(f); + } QHBoxLayout *l = new QHBoxLayout(); l->setContentsMargins(10,0,10,0); |