--- a/QTfrontend/ammoSchemeModel.cpp Thu Dec 23 17:47:50 2010 +0100
+++ b/QTfrontend/ammoSchemeModel.cpp Thu Dec 23 20:26:31 2010 +0100
@@ -628,12 +628,20 @@
{
Q_UNUSED(count);
- beginInsertRows(parent, row, row);
+ beginInsertRows(parent, schemes.size(), schemes.size());
- QList<QVariant> newScheme = defaultScheme;
- newScheme[0] = QVariant(tr("new"));
-
- schemes.insert(row, newScheme);
+ if (row == -1)
+ {
+ QList<QVariant> newScheme = defaultScheme;
+ newScheme[0] = QVariant(tr("new"));
+ schemes.insert(schemes.size(), newScheme);
+ }
+ else
+ {
+ QList<QVariant> newScheme = schemes[row];
+ newScheme[0] = QVariant(tr("copy of") + " " + newScheme[0].toString());
+ schemes.insert(schemes.size(), newScheme);
+ }
endInsertRows();