--- 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)