SSH Plugin: Don't keep the old profile when no profile is set

wilder
Tomaz Canabrava 4 years ago committed by Tomaz Canabrava
parent c02168f41f
commit a49dfc0f53
  1. 6
      src/plugins/SSHManager/sshmanagerpluginwidget.cpp

@ -246,7 +246,11 @@ void SSHManagerTreeWidget::editSshInfo()
ui->name->setText(data.name);
ui->port->setText(data.port);
ui->sshkey->setText(data.sshKey);
ui->profile->setCurrentText(data.profileName);
if (data.profileName.isEmpty()) {
ui->profile->setCurrentIndex(0);
} else {
ui->profile->setCurrentText(data.profileName);
}
ui->username->setText(data.username);
ui->useSshConfig->setCheckState(data.useSshConfig ? Qt::Checked : Qt::Unchecked);

Loading…
Cancel
Save