mirror of
https://gitea.sffempire.ru/Kolyah35/minecraft-pe-0.6.1.git
synced 2026-03-19 22:43:32 +00:00
Prevent duplicate world IDs by loading existing level list before generating a unique name
This commit is contained in:
@@ -32,6 +32,13 @@ SimpleChooseLevelScreen::~SimpleChooseLevelScreen()
|
||||
|
||||
void SimpleChooseLevelScreen::init()
|
||||
{
|
||||
// make sure the base class loads the existing level list; the
|
||||
// derived screen uses ChooseLevelScreen::getUniqueLevelName(), which
|
||||
// depends on `levels` being populated. omitting this used to result
|
||||
// in duplicate IDs ("creating the second world would load the
|
||||
// first") when the name already existed.
|
||||
ChooseLevelScreen::init();
|
||||
|
||||
tLevelName.text = "New world";
|
||||
|
||||
// header + close button
|
||||
|
||||
Reference in New Issue
Block a user