equal
deleted
inserted
replaced
268 |
268 |
269 void GameCFGWidget::setNetAmmo(const QString& name, const QString& ammo) |
269 void GameCFGWidget::setNetAmmo(const QString& name, const QString& ammo) |
270 { |
270 { |
271 bool illegal = ammo.size() != cDefaultAmmoStore->size(); |
271 bool illegal = ammo.size() != cDefaultAmmoStore->size(); |
272 if (illegal) |
272 if (illegal) |
273 QMessageBox::critical(this, tr("Error"), tr("Illegal ammo scheme")); |
273 { |
|
274 QMessageBox illegalMsg(this); |
|
275 illegalMsg.setIcon(QMessageBox::Warning); |
|
276 illegalMsg.setWindowTitle(QMessageBox::tr("Error")); |
|
277 illegalMsg.setText(QMessageBox::tr("Cannot use the ammo '%1'!").arg(name)); |
|
278 illegalMsg.setWindowModality(Qt::WindowModal); |
|
279 illegalMsg.exec(); |
|
280 } |
274 |
281 |
275 int pos = WeaponsName->findText(name); |
282 int pos = WeaponsName->findText(name); |
276 if ((pos == -1) || illegal) // prevent from overriding schemes with bad ones |
283 if ((pos == -1) || illegal) // prevent from overriding schemes with bad ones |
277 { |
284 { |
278 WeaponsName->addItem(name, ammo); |
285 WeaponsName->addItem(name, ammo); |