Add support for "no default account"

This commit is contained in:
Sky
2013-11-27 23:39:36 +00:00
parent d32cb1c95d
commit 191e850cf1
3 changed files with 29 additions and 9 deletions

View File

@ -100,8 +100,10 @@ void MojangAccountList::setActiveAccount(const QString& username)
else
{
for (MojangAccountPtr account : m_accounts)
{
if (account->username() == username)
m_activeAccount = username;
}
}
endResetModel();
onListChanged();
@ -113,7 +115,9 @@ void MojangAccountList::onListChanged()
if (m_autosave)
// TODO: Alert the user if this fails.
saveList();
emit listChanged();
// TODO: stop this getting called from setActiveAccount
//emit listChanged();
}