--- a/QTfrontend/teamselhelper.cpp Thu Feb 01 21:42:11 2007 +0000
+++ b/QTfrontend/teamselhelper.cpp Fri Feb 02 21:04:36 2007 +0000
@@ -118,7 +118,16 @@
if(++pOurFrameTeams->currentColor==pOurFrameTeams->availableColors.end()) {
pOurFrameTeams->currentColor=pOurFrameTeams->availableColors.begin();
}
- color=QColor(*pOurFrameTeams->currentColor);
+ color=*pOurFrameTeams->currentColor;
+ } else {
+ // set according color iterator
+ pOurFrameTeams->currentColor=std::find(pOurFrameTeams->availableColors.begin(),
+ pOurFrameTeams->availableColors.end(), color);
+ if(pOurFrameTeams->currentColor==pOurFrameTeams->availableColors.end()) {
+ // error condition
+ throw;
+ pOurFrameTeams->currentColor=pOurFrameTeams->availableColors.begin();
+ }
}
QPalette newPalette = palette();