From 7a1ccdb028c13164f7ce27407cd9d61ec8e824ff Mon Sep 17 00:00:00 2001 From: Jared Adams Date: Sun, 14 Mar 2010 19:33:27 -0600 Subject: Fix saving the selected server Reviewed-By: Freeyorp --- src/gui/serverdialog.cpp | 6 +++--- 1 file 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); -- cgit v1.2.3-70-g09d2