QTfrontend/ui/widget/frameTeam.cpp
changeset 7258 722e8a0d89dc
parent 7130 fcab1fd02bc6
child 9080 9b42757d7e71
--- a/QTfrontend/ui/widget/frameTeam.cpp	Sun Jun 17 16:32:44 2012 +0200
+++ b/QTfrontend/ui/widget/frameTeam.cpp	Sun Jun 17 21:45:49 2012 +0400
@@ -25,6 +25,7 @@
 #include "frameTeam.h"
 #include "teamselhelper.h"
 #include "hwconsts.h"
+#include "DataManager.h"
 
 FrameTeams::FrameTeams(QWidget* parent) :
     QFrame(parent), maxHedgehogsPerGame(48), overallHedgehogs(0), mainLayout(this), nonInteractive(false)
@@ -54,12 +55,12 @@
 
 void FrameTeams::resetColors()
 {
-    currentColor = colorsModel->rowCount() - 1; // ensure next color is the first one
+    currentColor = DataManager::instance().colorsModel()->rowCount() - 1; // ensure next color is the first one
 }
 
 int FrameTeams::getNextColor()
 {
-    currentColor = (currentColor + 1) % colorsModel->rowCount();
+    currentColor = (currentColor + 1) % DataManager::instance().colorsModel()->rowCount();
     return currentColor;
 }