mirror of
https://github.com/ReMinecraftPE/mcpe.git
synced 2025-01-22 17:23:32 -05:00
* Fix duplication of world items when resizing.
This commit is contained in:
parent
e44520c25c
commit
e9b00e6ba1
1 changed files with 6 additions and 0 deletions
|
@ -27,6 +27,8 @@ SelectWorldScreen::SelectWorldScreen() :
|
|||
|
||||
void SelectWorldScreen::init()
|
||||
{
|
||||
SAFE_DELETE(m_pWorldSelectionList);
|
||||
|
||||
m_pWorldSelectionList = new WorldSelectionList(m_pMinecraft, m_width, m_height);
|
||||
loadLevelSource();
|
||||
m_pWorldSelectionList->commit();
|
||||
|
@ -253,6 +255,10 @@ std::string SelectWorldScreen::getUniqueLevelName(const std::string& in)
|
|||
|
||||
void SelectWorldScreen::loadLevelSource()
|
||||
{
|
||||
m_pWorldSelectionList->m_items.clear();
|
||||
|
||||
m_levels.clear();
|
||||
|
||||
m_pMinecraft->getLevelSource()->getLevelList(m_levels);
|
||||
|
||||
std::sort(m_levels.begin(), m_levels.end());
|
||||
|
|
Loading…
Reference in a new issue