Slightly better naming of new or copied ammo/game schemes
authorWuzzy <almikes@aol.com>
Fri, 06 May 2016 18:49:41 +0200
changeset 11822 5f21387edff1
parent 11821 f73a299c7884
child 11823 b421923c2577
Slightly better naming of new or copied ammo/game schemes
QTfrontend/model/ammoSchemeModel.cpp
QTfrontend/ui/widget/selectWeapon.cpp
--- a/QTfrontend/model/ammoSchemeModel.cpp	Fri May 06 18:35:33 2016 +0200
+++ b/QTfrontend/model/ammoSchemeModel.cpp	Fri May 06 18:49:41 2016 +0200
@@ -755,13 +755,13 @@
     if (row == -1)
     {
         QList<QVariant> newScheme = defaultScheme;
-        newScheme[0] = QVariant(tr("new"));
+        newScheme[0] = QVariant(tr("New"));
         schemes.insert(schemes.size(), newScheme);
     }
     else
     {
         QList<QVariant> newScheme = schemes[row];
-        newScheme[0] = QVariant(tr("copy of %1").arg(newScheme[0].toString()));
+        newScheme[0] = QVariant(tr("Copy of %1").arg(newScheme[0].toString()));
         schemes.insert(schemes.size(), newScheme);
     }
 
--- a/QTfrontend/ui/widget/selectWeapon.cpp	Fri May 06 18:35:33 2016 +0200
+++ b/QTfrontend/ui/widget/selectWeapon.cpp	Fri May 06 18:49:41 2016 +0200
@@ -286,12 +286,12 @@
 
 void SelWeaponWidget::newWeaponsName()
 {
-    QString newName = tr("new");
+    QString newName = tr("New");
     if(wconf->contains(newName))
     {
         //name already used -> look for an appropriate name:
         int i=2;
-        while(wconf->contains(newName = tr("new")+QString::number(i++))) ;
+        while(wconf->contains(newName = tr("New (%1)").arg(i++))) ;
     }
     setWeaponsName(newName);
 }
@@ -322,12 +322,12 @@
     if(wconf->contains(curWeaponsName))
     {
         QString ammo = getWeaponsString(curWeaponsName);
-        QString newName = tr("copy of %1").arg(curWeaponsName);
+        QString newName = tr("Copy of %1").arg(curWeaponsName);
         if(wconf->contains(newName))
         {
             //name already used -> look for an appropriate name:
             int i=2;
-            while(wconf->contains(newName = tr("copy of %1").arg(curWeaponsName+QString::number(i++))));
+            while(wconf->contains(newName = tr("Copy of %1 (%2)").arg(curWeaponsName, i++)));
         }
         setWeaponsName(newName);
         setWeapons(ammo);