diff -r d9b88dbdf5a9 -r dde4a4a3e0e1 QTfrontend/teamselhelper.cpp --- 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();