diff options
author | Jared Adams <jaxad0127@gmail.com> | 2010-03-14 19:33:27 -0600 |
---|---|---|
committer | Jared Adams <jaxad0127@gmail.com> | 2010-03-14 20:35:21 -0600 |
commit | 7a1ccdb028c13164f7ce27407cd9d61ec8e824ff (patch) | |
tree | 8fda8fa7c1ce881453f9ff3d0f649265147f2e32 /src/gui/serverdialog.cpp | |
parent | 152d810fbdd1df72c301e9b07f69e2e87ffed900 (diff) | |
download | mana-7a1ccdb028c13164f7ce27407cd9d61ec8e824ff.tar.gz mana-7a1ccdb028c13164f7ce27407cd9d61ec8e824ff.tar.bz2 mana-7a1ccdb028c13164f7ce27407cd9d61ec8e824ff.tar.xz mana-7a1ccdb028c13164f7ce27407cd9d61ec8e824ff.zip |
Fix saving the selected server
Reviewed-By: Freeyorp
Diffstat (limited to 'src/gui/serverdialog.cpp')
-rw-r--r-- | src/gui/serverdialog.cpp | 6 |
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 ¤tServer) 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); |