From 191e850cf14666302c3338d69073d1f417925a45 Mon Sep 17 00:00:00 2001 From: Sky Date: Wed, 27 Nov 2013 23:39:36 +0000 Subject: Add support for "no default account" --- logic/lists/MojangAccountList.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'logic/lists/MojangAccountList.cpp') diff --git a/logic/lists/MojangAccountList.cpp b/logic/lists/MojangAccountList.cpp index a30ef4ab..c6dce836 100644 --- a/logic/lists/MojangAccountList.cpp +++ b/logic/lists/MojangAccountList.cpp @@ -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(); } -- cgit v1.2.3