From 4997e2fb0e41056c797632aef354447062040f66 Mon Sep 17 00:00:00 2001
From: deva <deva>
Date: Tue, 8 Feb 2011 14:06:17 +0000
Subject: Remake previous fix for resume text not shown in full height.

---
 client/macrowindow.cc | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

(limited to 'client')

diff --git a/client/macrowindow.cc b/client/macrowindow.cc
index 4ee5404..37dc6e3 100644
--- a/client/macrowindow.cc
+++ b/client/macrowindow.cc
@@ -109,8 +109,12 @@ void MacroWindow::initMacro(QDomNode &node)
       if(elem.attribute("state") == "dirty") state = ResumeWidget::DIRTY;
     }
 
-    collapse();
+    if(!mainwidget) { // Only call collapse if the macro is in resume state.
+      collapse();
+    }
+
     ((ResumeWidget*)collapsedWidget())->setText(resume, state);
+    
   } else if(elem.tagName() == "script") {
 
     lua->runScript(elem.text(), NULL, "preload");
@@ -123,11 +127,11 @@ void MacroWindow::initMacro(QDomNode &node)
       clear();
     }
 
-    DEBUG(mainwindow, "----------------------Before--------------------------");
+    DEBUG(mainwindow, "----------------------Before-----------------------\n");
 
     Window *window = new Window(elem, this);
 
-    DEBUG(mainwindow, "----------------------After--------------------------");
+    DEBUG(mainwindow, "----------------------After------------------------\n");
 
     connect(window, SIGNAL(wasChanged()), this, SLOT(macroChanged()));
     macrotitle = elem.attribute("caption");
-- 
cgit v1.2.3