From 355772289f57522157759b6150ebfd2cc849c0ae Mon Sep 17 00:00:00 2001 From: deva Date: Mon, 22 Sep 2008 12:21:14 +0000 Subject: 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. --- client/macrowindow.cc | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'client/macrowindow.cc') 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); -- cgit v1.2.3