diff options
author | Yohann Ferreira <yohann_dot_ferreira_at_orange_dot_efer> | 2012-01-27 12:42:14 +0100 |
---|---|---|
committer | Yohann Ferreira <yohann_dot_ferreira_at_orange_dot_efer> | 2012-01-31 23:38:51 +0100 |
commit | 2e70a4a4412f44934b3d2055c5b46c441dd0d132 (patch) | |
tree | adf4e2aa9af2342c9d700bf6e046a3e29b3d39c0 /src/gui | |
parent | 3b391ad0b59d0a8a7547134bc3ca744c2f38acee (diff) | |
download | mana-2e70a4a4412f44934b3d2055c5b46c441dd0d132.tar.gz mana-2e70a4a4412f44934b3d2055c5b46c441dd0d132.tar.bz2 mana-2e70a4a4412f44934b3d2055c5b46c441dd0d132.tar.xz mana-2e70a4a4412f44934b3d2055c5b46c441dd0d132.zip |
Fixed saving the selected server at server connection level.
I also change the serverInfo to use a deque to permit
the use of the push_front function.
Spotted and reviewed-by: Erik Schilling
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/serverdialog.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/gui/serverdialog.cpp b/src/gui/serverdialog.cpp index 6dae9ea9..91e5fdeb 100644 --- a/src/gui/serverdialog.cpp +++ b/src/gui/serverdialog.cpp @@ -298,11 +298,13 @@ void ServerDialog::action(const gcn::ActionEvent &event) const ServerInfo &serverInfo = mServersListModel->getServer(index); mServerInfo->hostname = serverInfo.hostname; + mServerInfo->name = serverInfo.name; mServerInfo->port = serverInfo.port; mServerInfo->type = serverInfo.type; // Save the selected server mServerInfo->save = true; + saveCustomServers(*mServerInfo); chatLogger->setServerName(mServerInfo->hostname); @@ -587,7 +589,7 @@ void ServerDialog::saveCustomServers(const ServerInfo ¤tServer, int index) break; } } - mServers.insert(mServers.begin(), currentServer); + mServers.push_front(currentServer); } } |