summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJared Adams <jaxad0127@gmail.com>2010-03-14 19:33:27 -0600
committerJared Adams <jaxad0127@gmail.com>2010-03-14 20:35:21 -0600
commit7a1ccdb028c13164f7ce27407cd9d61ec8e824ff (patch)
tree8fda8fa7c1ce881453f9ff3d0f649265147f2e32
parent152d810fbdd1df72c301e9b07f69e2e87ffed900 (diff)
downloadMana-7a1ccdb028c13164f7ce27407cd9d61ec8e824ff.tar.gz
Mana-7a1ccdb028c13164f7ce27407cd9d61ec8e824ff.tar.bz2
Mana-7a1ccdb028c13164f7ce27407cd9d61ec8e824ff.tar.xz
Mana-7a1ccdb028c13164f7ce27407cd9d61ec8e824ff.zip
Fix saving the selected server
Reviewed-By: Freeyorp
-rw-r--r--src/gui/serverdialog.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/gui/serverdialog.cpp b/src/gui/serverdialog.cpp
index 2b6f1dea..dd34a24e 100644
--- a/src/gui/serverdialog.cpp
+++ b/src/gui/serverdialog.cpp
@@ -262,8 +262,8 @@ void ServerDialog::action(const gcn::ActionEvent &event)
mServerInfo->type = ServerInfo::UNKNOWN;
}
- // Save when it is not one of the selected servers
- mServerInfo->save = (mServersList->getSelected() == -1);
+ // Save the selected server
+ mServerInfo->save = true;
saveCustomServers(*mServerInfo);
@@ -532,7 +532,7 @@ void ServerDialog::saveCustomServers(const ServerInfo &currentServer)
const ServerInfo &server = mServers.at(i);
// Only save servers that were loaded from settings
- if (!server.save)
+ if (!(server.save && server.isValid()))
continue;
const std::string index = toString(savedServerCount);