From 64f771bc1f974c60c508a65b7a0d0e412a27fb04 Mon Sep 17 00:00:00 2001 From: Mikaƫl Capelle Date: Mon, 28 Dec 2020 19:28:16 +0100 Subject: Refresh by-priority proxy after install and focus on the newly installed mod. --- src/mainwindow.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/mainwindow.cpp') 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 IDs; -- cgit v1.3.1