summaryrefslogtreecommitdiff
path: root/src/mainwindow.cpp
diff options
context:
space:
mode:
authorMikaël Capelle <capelle.mikael@gmail.com>2020-12-28 19:28:16 +0100
committerMikaël Capelle <capelle.mikael@gmail.com>2021-01-02 15:38:15 +0100
commit64f771bc1f974c60c508a65b7a0d0e412a27fb04 (patch)
tree7783d4844d687590ec05755670bf80cc62578d11 /src/mainwindow.cpp
parente1ef7132ad719ee9e16acd0f7a2110021bc86e2f (diff)
Refresh by-priority proxy after install and focus on the newly installed mod.
Diffstat (limited to 'src/mainwindow.cpp')
-rw-r--r--src/mainwindow.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp
index 61d0e5bb..9ca7e534 100644
--- a/src/mainwindow.cpp
+++ b/src/mainwindow.cpp
@@ -2551,10 +2551,14 @@ void MainWindow::modInstalled(const QString &modName)
QModelIndex qIndex = m_OrganizerCore.modList()->index(index, 0);
if (m_ModListSortProxy->sourceModel() == m_ModListByPriorityProxy) {
+ m_ModListByPriorityProxy->refresh();
qIndex = m_ModListByPriorityProxy->mapFromSource(qIndex);
ui->modList->expand(m_ModListSortProxy->mapFromSource(qIndex));
}
+
+ ui->modList->setCurrentIndex(m_ModListSortProxy->mapFromSource(qIndex));
ui->modList->scrollTo(m_ModListSortProxy->mapFromSource(qIndex));
+ ui->modList->setFocus(Qt::OtherFocusReason);
// force an update to happen
std::multimap<QString, int> IDs;