diff options
author | deva <deva> | 2008-09-22 12:21:14 +0000 |
---|---|---|
committer | deva <deva> | 2008-09-22 12:21:14 +0000 |
commit | 355772289f57522157759b6150ebfd2cc849c0ae (patch) | |
tree | e8cbecdf03e8d627d0a7d902422f7f9684f47e90 /client/macrowindow.cc | |
parent | 64f5bc46a4925da459704092e884e747ccbc544c (diff) |
Made the client use the static attribute to set a macro always visible, non-collapsable. Made the macro widgetlist clear itself when loading a new macro.
Diffstat (limited to 'client/macrowindow.cc')
-rw-r--r-- | client/macrowindow.cc | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/client/macrowindow.cc b/client/macrowindow.cc index 6a20632..3161ce6 100644 --- a/client/macrowindow.cc +++ b/client/macrowindow.cc @@ -44,16 +44,18 @@ extern QString user; extern QString host; extern quint16 port; -MacroWindow::MacroWindow(NetCom &n, QDomNode &xml_doc, QString course) +MacroWindow::MacroWindow(NetCom &n, QDomNode &xml_doc, QString course, bool collapsed) : Collapser(), netcom(n) { this->course = course; - mainwidget = NULL; - setCollapsedWidget(new QLabel("Empty")); + + setCollapsedWidget(new QLabel("")); this->lua = new LUA(this); update(xml_doc); + + setCollapsed(collapsed); } MacroWindow::~MacroWindow() @@ -69,6 +71,11 @@ void MacroWindow::update(QDomNode &node) // mainwidget = new QLabel("Expanded"); // resumewidget = new QLabel("Collapsed"); + mainwidget = NULL; + + widgets.clear(); + auxwidgets.clear(); + initMacro(node); if(mainwidget) setExpandedWidget(mainwidget); |