Avoid duplicate name in GP editor
This commit is contained in:
parent
6521e3d496
commit
ae2e6f77ad
@ -81,7 +81,7 @@ void EnterGPNameDialog::onEnterPressedInternal()
|
|||||||
TextBoxWidget* textCtrl = getWidget<TextBoxWidget>("textfield");
|
TextBoxWidget* textCtrl = getWidget<TextBoxWidget>("textfield");
|
||||||
assert(textCtrl != NULL);
|
assert(textCtrl != NULL);
|
||||||
stringw name = textCtrl->getText().trim();
|
stringw name = textCtrl->getText().trim();
|
||||||
if (name.size() > 0)
|
if (name.size() > 0 && name != "Random Grand Prix")
|
||||||
{
|
{
|
||||||
// check for duplicate names
|
// check for duplicate names
|
||||||
for (unsigned int i = 0; i < grand_prix_manager->getNumberOfGrandPrix(); i++)
|
for (unsigned int i = 0; i < grand_prix_manager->getNumberOfGrandPrix(); i++)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user