--- 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;