diff options
author | TheKodeToad <TheKodeToad@proton.me> | 2023-08-21 13:55:28 +0100 |
---|---|---|
committer | TheKodeToad <TheKodeToad@proton.me> | 2023-08-21 14:44:46 +0100 |
commit | d7dadabfbf61a46996d13894ed591d057bb8c1b3 (patch) | |
tree | 45237ae9fe2b126d0a09599fb11f6f41bcef8b47 /launcher/minecraft | |
parent | f99b04bd1656a8e5cd871c1fadc1550e663fc33a (diff) | |
download | PrismLauncher-d7dadabfbf61a46996d13894ed591d057bb8c1b3.tar.gz PrismLauncher-d7dadabfbf61a46996d13894ed591d057bb8c1b3.tar.bz2 PrismLauncher-d7dadabfbf61a46996d13894ed591d057bb8c1b3.zip |
List fixes
Double-click to toggle profile components.
Restore double-click to toggle resources.
Fix clicking on checkbox to select account.
Double-click to select account.
Signed-off-by: TheKodeToad <TheKodeToad@proton.me>
Diffstat (limited to 'launcher/minecraft')
-rw-r--r-- | launcher/minecraft/auth/AccountList.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/launcher/minecraft/auth/AccountList.cpp b/launcher/minecraft/auth/AccountList.cpp index c534ea3b..84dbd841 100644 --- a/launcher/minecraft/auth/AccountList.cpp +++ b/launcher/minecraft/auth/AccountList.cpp @@ -415,7 +415,7 @@ Qt::ItemFlags AccountList::flags(const QModelIndex& index) const bool AccountList::setData(const QModelIndex& idx, const QVariant& value, int role) { - if (idx.row() < 0 || idx.row() >= rowCount(idx) || !idx.isValid()) { + if (idx.row() < 0 || idx.row() >= rowCount(idx.parent()) || !idx.isValid()) { return false; } @@ -423,7 +423,8 @@ bool AccountList::setData(const QModelIndex& idx, const QVariant& value, int rol if (value == Qt::Checked) { MinecraftAccountPtr account = at(idx.row()); setDefaultAccount(account); - } + } else if (m_defaultAccount == at(idx.row())) + setDefaultAccount(nullptr); } emit dataChanged(idx, index(idx.row(), columnCount(QModelIndex()) - 1)); |