summaryrefslogtreecommitdiff
path: root/client/macrowindow.cc
diff options
context:
space:
mode:
authordeva <deva>2008-09-22 12:21:14 +0000
committerdeva <deva>2008-09-22 12:21:14 +0000
commit355772289f57522157759b6150ebfd2cc849c0ae (patch)
treee8cbecdf03e8d627d0a7d902422f7f9684f47e90 /client/macrowindow.cc
parent64f5bc46a4925da459704092e884e747ccbc544c (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.cc13
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);