mirror of
https://github.com/redstrate/Astra.git
synced 2025-04-23 12:57:45 +00:00
Only enable lobby URL if using a Sapphire server
This commit is contained in:
parent
516b47a541
commit
36220ffe7b
1 changed files with 3 additions and 1 deletions
|
@ -101,8 +101,9 @@ SettingsWindow::SettingsWindow(LauncherWindow& window, QWidget* parent) : window
|
|||
serverType->insertItem(1, "Sapphire");
|
||||
|
||||
connect(serverType, &QComboBox::currentIndexChanged, [=](int index) {
|
||||
getCurrentProfile().isSapphire = serverType->currentIndex() == 1;
|
||||
getCurrentProfile().isSapphire = index == 1;
|
||||
|
||||
reloadControls();
|
||||
this->window.reloadControls();
|
||||
this->window.saveSettings();
|
||||
});
|
||||
|
@ -300,6 +301,7 @@ void SettingsWindow::reloadControls() {
|
|||
|
||||
// login
|
||||
serverType->setCurrentIndex(profile.isSapphire ? 1 : 0);
|
||||
lobbyServerURL->setEnabled(profile.isSapphire);
|
||||
lobbyServerURL->setText(profile.lobbyURL);
|
||||
rememberUsernameBox->setChecked(profile.rememberUsername);
|
||||
rememberPasswordBox->setChecked(profile.rememberPassword);
|
||||
|
|
Loading…
Add table
Reference in a new issue