QTfrontend/teamselect.cpp
changeset 151 9eb5a4cee35e
parent 150 d9e8a336195c
child 152 c558957ef644
--- a/QTfrontend/teamselect.cpp	Sat Sep 16 17:24:41 2006 +0000
+++ b/QTfrontend/teamselect.cpp	Mon Sep 18 17:37:22 2006 +0000
@@ -80,8 +80,21 @@
   addScrArea(frameDontPlaying, QColor("LightGoldenrodYellow"));
 }
 
-void TeamSelWidget::resetPlayingTeams()
+void TeamSelWidget::resetPlayingTeams(const QStringList& teamslist)
 {
+  list<HWTeam>::iterator it;
+  for(it=curPlayingTeams.begin(); it!=curPlayingTeams.end(); it++) {
+    framePlaying->removeTeam(*it);
+  }
+  curPlayingTeams.clear();
+  for(it=curDontPlayingTeams.begin(); it!=curDontPlayingTeams.end(); it++) {
+    frameDontPlaying->removeTeam(*it);
+  }
+  curDontPlayingTeams.clear();
+
+  for (QStringList::ConstIterator it = teamslist.begin(); it != teamslist.end(); ++it ) {
+    addTeam(*it);
+  }
 }
 
 bool TeamSelWidget::isPlaying(HWTeam team)