equal
deleted
inserted
replaced
395 return schemes[index.row()][index.column()]; |
395 return schemes[index.row()][index.column()]; |
396 } |
396 } |
397 |
397 |
398 void AmmoSchemeModel::Save() |
398 void AmmoSchemeModel::Save() |
399 { |
399 { |
400 fileConfig.beginWriteArray("schemes", schemes.size()); |
400 fileConfig.beginWriteArray("schemes", schemes.size() - numberOfDefaultSchemes); |
401 |
401 |
402 for (int i = 0; i < schemes.size(); ++i) { |
402 for (int i = 0; i < schemes.size() - numberOfDefaultSchemes; ++i) { |
403 fileConfig.setArrayIndex(i); |
403 fileConfig.setArrayIndex(i); |
404 |
404 |
405 QList<QVariant> scheme = schemes[i]; |
405 QList<QVariant> scheme = schemes[i + numberOfDefaultSchemes]; |
406 |
406 |
407 for (int k = 0; k < scheme.size(); ++k) |
407 for (int k = 0; k < scheme.size(); ++k) |
408 fileConfig.setValue(spNames[k], scheme[k]); |
408 fileConfig.setValue(spNames[k], scheme[k]); |
409 } |
409 } |
410 fileConfig.endArray(); |
410 fileConfig.endArray(); |