--- a/QTfrontend/ammoSchemeModel.cpp Tue Dec 21 21:56:34 2010 +0100
+++ b/QTfrontend/ammoSchemeModel.cpp Tue Dec 21 23:22:53 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();