aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPerttu Ahola <celeron55@gmail.com>2012-03-18 15:26:06 +0200
committerPerttu Ahola <celeron55@gmail.com>2012-03-18 15:26:06 +0200
commitc1cfcb15774b05285acc91be928b90105f71632b (patch)
treeaf4d106831683abc2283dc84e0a3dfaecf5ccc6d
parent2e90ed07acd295387c0da6c0689d14665b6c125d (diff)
downloadminetest-c1cfcb15774b05285acc91be928b90105f71632b.tar.gz
minetest-c1cfcb15774b05285acc91be928b90105f71632b.tar.bz2
minetest-c1cfcb15774b05285acc91be928b90105f71632b.zip
Do not clear address in main menu if starting a singleplayer game by double clicking the world
-rw-r--r--src/guiMainMenu.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/guiMainMenu.cpp b/src/guiMainMenu.cpp
index 4ee153d3f..77a5c161e 100644
--- a/src/guiMainMenu.cpp
+++ b/src/guiMainMenu.cpp
@@ -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;
}