summaryrefslogtreecommitdiffstats
path: root/gui
diff options
context:
space:
mode:
authorSky <git@bunnies.cc>2013-10-21 22:08:09 +0100
committerSky <git@bunnies.cc>2013-10-21 22:08:09 +0100
commit867efd53a29ace0d2f09bcdde08edb4b571a4bd1 (patch)
tree6d5fec4398767da077e4db37938e4bd14196ff50 /gui
parent003fedde018c399a148b1e5caae34350d720024e (diff)
downloadMultiMC-867efd53a29ace0d2f09bcdde08edb4b571a4bd1.tar
MultiMC-867efd53a29ace0d2f09bcdde08edb4b571a4bd1.tar.gz
MultiMC-867efd53a29ace0d2f09bcdde08edb4b571a4bd1.tar.lz
MultiMC-867efd53a29ace0d2f09bcdde08edb4b571a4bd1.tar.xz
MultiMC-867efd53a29ace0d2f09bcdde08edb4b571a4bd1.zip
Bugfixes for auto login
Diffstat (limited to 'gui')
-rw-r--r--gui/mainwindow.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/gui/mainwindow.cpp b/gui/mainwindow.cpp
index d602efcf..cce16a93 100644
--- a/gui/mainwindow.cpp
+++ b/gui/mainwindow.cpp
@@ -461,14 +461,15 @@ void MainWindow::on_actionLaunchInstance_triggered()
{
if (m_selectedInstance)
{
- bool autoLogin = MMC->settings()->get("AutoLogin").toBool();
- if(autoLogin) doAutoLogin();
- else doLogin();
+ doLogin();
}
}
void MainWindow::doAutoLogin()
{
+ if (!m_selectedInstance)
+ return;
+
Keyring * k = Keyring::instance();
QStringList accounts = k->getStoredAccounts("minecraft");
@@ -480,6 +481,7 @@ void MainWindow::doAutoLogin()
if(!password.isEmpty())
{
QLOG_INFO() << "Automatically logging in with stored account: " << username;
+ m_activeInst = m_selectedInstance;
doLogin(username, password);
}
else