--- a/QTfrontend/ui/page/pageeditteam.cpp Sun Nov 25 01:13:51 2012 +0400
+++ b/QTfrontend/ui/page/pageeditteam.cpp Sun Nov 25 22:17:11 2012 +0400
@@ -412,14 +412,13 @@
for(int i = 0; i < HEDGEHOGS_PER_TEAM; i++)
{
- HWHog hh = team.hedgehog(i);
-
- HHNameEdit[i]->setText(hh.Name);
+ HHNameEdit[i]->setText(team.hedgehogName(i));
- if (hh.Hat.startsWith("Reserved"))
- hh.Hat = "Reserved "+hh.Hat.remove(0,40);
+ QString hat = team.hedgehogHat(i);
+ if (hat.startsWith("Reserved"))
+ hat = "Reserved " + hat.mid(40);
- HHHats[i]->setCurrentIndex(HHHats[i]->findData(hh.Hat, Qt::DisplayRole));
+ HHHats[i]->setCurrentIndex(HHHats[i]->findData(hat, Qt::DisplayRole));
}
CBGrave->setCurrentIndex(CBGrave->findText(team.grave()));
@@ -447,14 +446,13 @@
for(int i = 0; i < HEDGEHOGS_PER_TEAM; i++)
{
- HWHog hh;
- hh.Name = HHNameEdit[i]->text();
- hh.Hat = HHHats[i]->currentText();
+ QString hat = HHHats[i]->currentText();
- if (hh.Hat.startsWith("Reserved"))
- hh.Hat = "Reserved"+m_playerHash+hh.Hat.remove(0,9);
+ if (hat.startsWith("Reserved"))
+ hat = "Reserved" + m_playerHash + hat.mid(9);
- team.setHedgehog(i,hh);
+ team.setHedgehogName(i, HHNameEdit[i]->text());
+ team.setHedgehogHat(i, hat);
}
team.setGrave(CBGrave->currentText());