QTfrontend/hwform.cpp
changeset 60 7fbfa2f13f6f
parent 52 ae2950c5465c
child 84 0f6669da2fcb
--- a/QTfrontend/hwform.cpp	Sat Feb 04 22:37:12 2006 +0000
+++ b/QTfrontend/hwform.cpp	Sun Feb 05 12:48:02 2006 +0000
@@ -44,7 +44,6 @@
 #include "hwform.h"
 #include "sdlkeys.h"
 #include "hwconsts.h"
-#include "teamselect.h"
 
 HWForm::HWForm(QWidget *parent)
 	: QMainWindow(parent)
@@ -123,10 +122,12 @@
 	  list.push_back("DefaultTeam");
 	}
 
+	pts=new TeamSelWidget(ui.Pages->widget(ID_PAGE_SINGLEPLAYER));
+
 	for (QStringList::Iterator it = list.begin(); it != list.end(); ++it )
 	{
 	  QString tmpTeamStr=(*it).replace(QRegExp("^(.*).cfg$"), "\\1");
-	  m_teamNames.push_back(tmpTeamStr);
+	  pts->addTeam(tmpTeamStr);
 	  ui.CBTeamName->addItem(tmpTeamStr);
 	}
 
@@ -195,8 +196,6 @@
 {
 	ui.Pages->setCurrentIndex(ID_PAGE_SINGLEPLAYER);
 
-	TeamSelWidget* pts=new TeamSelWidget(m_teamNames, ui.Pages->widget(ID_PAGE_SINGLEPLAYER));
-
 	pts->resize(500, 350);
 	pts->show();
 }