--- a/QTfrontend/ammoSchemeModel.cpp Thu Sep 10 15:29:28 2009 +0000
+++ b/QTfrontend/ammoSchemeModel.cpp Thu Sep 10 15:30:11 2009 +0000
@@ -56,7 +56,7 @@
<< "Shoppa"
<< "Basketball"
<< "Minefield";
-
+
spNames = QStringList()
<< "name" // 0
<< "fortsmode" // 1
@@ -244,11 +244,11 @@
QList<QVariant> newScheme = defaultScheme;
newScheme[0] = QVariant(tr("new"));
-
+
schemes.insert(row, newScheme);
endInsertRows();
-
+
return true;
}
@@ -258,7 +258,7 @@
|| row < numberOfDefaultSchemes
|| row >= schemes.size())
return false;
-
+
beginRemoveRows(parent, row, row);
schemes.removeAt(row);
@@ -283,12 +283,12 @@
void AmmoSchemeModel::Save()
{
fileConfig.beginWriteArray("schemes", schemes.size());
-
+
for (int i = 0; i < schemes.size(); ++i) {
fileConfig.setArrayIndex(i);
QList<QVariant> scheme = schemes[i];
-
+
for (int k = 0; k < scheme.size(); ++k)
fileConfig.setValue(spNames[k], scheme[k]);
}