Skip to content

Commit

Permalink
Refs #95. Fixed issues when only 1 server in config file
Browse files Browse the repository at this point in the history
  • Loading branch information
SBriere committed Oct 8, 2024
1 parent e090b5c commit 858803e
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions client/src/dialogs/WebLoginDialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,17 @@ void WebLoginDialog::setServerNames(QStringList servers)
// Select server from the list if we have a setting for that
if (current_server.isValid()){
QString server_name = current_server.toString();
if (servers.contains(server_name))
ui->cmbServers->setCurrentText(server_name);
if (servers.contains(server_name)){
if (ui->cmbServers->currentText() != server_name)
ui->cmbServers->setCurrentText(server_name);
else
onServerSelected(0);
}
}else{
if (ui->cmbServers->count() > 0){
ui->cmbServers->setCurrentIndex(0);
onServerSelected(0);
}
}
}

Expand Down Expand Up @@ -178,6 +187,8 @@ void WebLoginDialog::showLargeView(const bool &large)

if (m_showServers){
ui->frameServers->setVisible(!large);
}else{
ui->frameServers->hide();
}
if (large){
setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
Expand Down

0 comments on commit 858803e

Please sign in to comment.