]> git.lizzy.rs Git - minetest.git/commitdiff
Do not clear address in main menu if starting a singleplayer game by double clicking...
authorPerttu Ahola <celeron55@gmail.com>
Sun, 18 Mar 2012 13:26:06 +0000 (15:26 +0200)
committerPerttu Ahola <celeron55@gmail.com>
Sun, 18 Mar 2012 13:26:06 +0000 (15:26 +0200)
src/guiMainMenu.cpp

index 4ee153d3f1b495cac2259f0ebaee0be8724c58e6..77a5c161efd454314868128abbcfcdcb89c10efe 100644 (file)
@@ -866,9 +866,10 @@ bool GUIMainMenu::OnEvent(const SEvent& event)
                {
                        switch(event.GUIEvent.Caller->getID())
                        {
-                               case GUI_ID_WORLD_LISTBOX:
+                       case GUI_ID_WORLD_LISTBOX:
                                acceptInput();
-                               m_data->address = L""; // Force local game
+                               if(getTab() != TAB_SINGLEPLAYER)
+                                       m_data->address = L""; // Force local game
                                quitMenu();
                                return true;
                        }