mirror of
https://github.com/celisej567/mcpe.git
synced 2026-09-11 20:11:18 +03:00
* Fix duplication of world items when resizing.
This commit is contained in:
@@ -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());
|
||||
|
||||
Reference in New Issue
Block a user