resize bugfix
authordisplacer
Sun, 20 Aug 2006 17:34:22 +0000
changeset 122 4911cf9c1924
parent 121 6c7111eddea9
child 123 6987769ced3d
resize bugfix
QTfrontend/teamselect.cpp
--- a/QTfrontend/teamselect.cpp	Sun Aug 20 17:18:53 2006 +0000
+++ b/QTfrontend/teamselect.cpp	Sun Aug 20 17:34:22 2006 +0000
@@ -51,7 +51,16 @@
   pRemoveTeams->removeTeam(team);
   QObject::connect(pAddTeams->getTeamWidget(team), SIGNAL(teamStatusChanged(HWTeam)),
 		   this, SLOT(changeTeamStatus(HWTeam)));
-  resize(sizeHint());
+  QSize szh=sizeHint();
+  if(szh.isValid()) resize(szh);
+  else {
+    szh=pAddTeams->sizeHint();
+    QSize szh1=pRemoveTeams->sizeHint();
+    if(szh.isValid() && szh1.isValid()) {
+      pAddTeams->resize(szh);
+      pRemoveTeams->resize(szh1);
+    }
+  }
 }
 
 void TeamSelWidget::addScrArea(FrameTeams* pfteams, QColor color)