QTfrontend/ammoSchemeModel.cpp
changeset 3494 208c5671b202
parent 3287 4f7b57ed18b6
child 3743 234ce4da76d4
--- a/QTfrontend/ammoSchemeModel.cpp	Thu Jun 03 23:02:35 2010 +0000
+++ b/QTfrontend/ammoSchemeModel.cpp	Fri Jun 04 20:50:24 2010 +0000
@@ -397,12 +397,12 @@
 
 void AmmoSchemeModel::Save()
 {
-    fileConfig.beginWriteArray("schemes", schemes.size());
+    fileConfig.beginWriteArray("schemes", schemes.size() - numberOfDefaultSchemes);
 
-    for (int i = 0; i < schemes.size(); ++i) {
+    for (int i = 0; i < schemes.size() - numberOfDefaultSchemes; ++i) {
         fileConfig.setArrayIndex(i);
 
-        QList<QVariant> scheme = schemes[i];
+        QList<QVariant> scheme = schemes[i + numberOfDefaultSchemes];
 
         for (int k = 0; k < scheme.size(); ++k)
             fileConfig.setValue(spNames[k], scheme[k]);