Focus password text box if there's an account saved by default. Save settings!
This commit is contained in:
parent
1f13f0c665
commit
ae6937ab81
@ -43,6 +43,13 @@ LoginDialog::LoginDialog(QWidget *parent, const QString& loginErrMsg) :
|
||||
QStringList accounts = k->getStoredAccounts("minecraft");
|
||||
ui->usernameTextBox->addItems(accounts);
|
||||
|
||||
// TODO: restore last selected account here, if applicable
|
||||
|
||||
int index = ui->usernameTextBox->currentIndex();
|
||||
if(index != -1)
|
||||
{
|
||||
ui->passwordTextBox->setFocus(Qt::OtherFocusReason);
|
||||
}
|
||||
}
|
||||
|
||||
LoginDialog::~LoginDialog()
|
||||
|
@ -36,6 +36,7 @@ void INISettingsObject::changeSetting(const Setting &setting, QVariant value)
|
||||
m_ini.set(setting.configKey(), value);
|
||||
else
|
||||
m_ini.remove(setting.configKey());
|
||||
m_ini.saveFile(m_filePath);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user