summaryrefslogtreecommitdiffstats
path: root/logic/lists/MojangAccountList.cpp
diff options
context:
space:
mode:
authorAndrew <forkk@forkk.net>2013-11-28 15:46:04 -0600
committerAndrew <forkk@forkk.net>2013-11-28 15:46:04 -0600
commitf7b64a551b6284abc855d8cb7d785844baa0ad9d (patch)
tree3a36a90363729dca16e913d6d7b7e43976214e31 /logic/lists/MojangAccountList.cpp
parent8232271c00efd82885a8790acb5b8e318411fd14 (diff)
downloadMultiMC-f7b64a551b6284abc855d8cb7d785844baa0ad9d.tar
MultiMC-f7b64a551b6284abc855d8cb7d785844baa0ad9d.tar.gz
MultiMC-f7b64a551b6284abc855d8cb7d785844baa0ad9d.tar.lz
MultiMC-f7b64a551b6284abc855d8cb7d785844baa0ad9d.tar.xz
MultiMC-f7b64a551b6284abc855d8cb7d785844baa0ad9d.zip
Add icon for when no default account is selected
Also fixed a bug where the icon on the accounts button wouldn't change when the user checked the "Use as default" checkbox in the account selection dialog.
Diffstat (limited to 'logic/lists/MojangAccountList.cpp')
-rw-r--r--logic/lists/MojangAccountList.cpp13
1 files changed, 10 insertions, 3 deletions
diff --git a/logic/lists/MojangAccountList.cpp b/logic/lists/MojangAccountList.cpp
index c6dce836..ec1937ad 100644
--- a/logic/lists/MojangAccountList.cpp
+++ b/logic/lists/MojangAccountList.cpp
@@ -106,7 +106,7 @@ void MojangAccountList::setActiveAccount(const QString& username)
}
}
endResetModel();
- onListChanged();
+ onActiveChanged();
}
@@ -116,8 +116,15 @@ void MojangAccountList::onListChanged()
// TODO: Alert the user if this fails.
saveList();
- // TODO: stop this getting called from setActiveAccount
- //emit listChanged();
+ emit listChanged();
+}
+
+void MojangAccountList::onActiveChanged()
+{
+ if (m_autosave)
+ saveList();
+
+ emit activeAccountChanged();
}