QTfrontend/selectWeapon.cpp
changeset 3494 208c5671b202
parent 2948 3f21a9dc93d0
child 3697 d5b30d6373fc
--- a/QTfrontend/selectWeapon.cpp	Thu Jun 03 23:02:35 2010 +0000
+++ b/QTfrontend/selectWeapon.cpp	Fri Jun 04 20:50:24 2010 +0000
@@ -168,11 +168,11 @@
 
 void SelWeaponWidget::save()
 {
-    if (m_name->text() == "Default") {
-        QMessageBox impossible(QMessageBox::Warning, QMessageBox::tr("Weapons"), QMessageBox::tr("Can not edit default weapon set"));
-        impossible.exec();
-        return;
-    }
+    for(int i = 0; i < cDefaultAmmos.size(); i++)
+        if (!cDefaultAmmos[i].first.compare(m_name->text())) {
+            QMessageBox::warning(0, QMessageBox::tr("Weapons"), QMessageBox::tr("Can not overwrite default weapon set '%1'!").arg(cDefaultAmmos[i].first));
+            return;
+        }
 
     if (m_name->text() == "") return;