summaryrefslogtreecommitdiff
path: root/client/macrowindow.cc
diff options
context:
space:
mode:
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);