diff options
-rw-r--r-- | gui/logindialog.cpp | 7 | ||||
-rw-r--r-- | libsettings/src/inisettingsobject.cpp | 1 |
2 files changed, 8 insertions, 0 deletions
diff --git a/gui/logindialog.cpp b/gui/logindialog.cpp index 842a4541..31220e74 100644 --- a/gui/logindialog.cpp +++ b/gui/logindialog.cpp @@ -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() diff --git a/libsettings/src/inisettingsobject.cpp b/libsettings/src/inisettingsobject.cpp index 8c4cc89d..17b132a3 100644 --- a/libsettings/src/inisettingsobject.cpp +++ b/libsettings/src/inisettingsobject.cpp @@ -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); } } |