summaryrefslogtreecommitdiff
path: root/src/mainwindow.cpp
diff options
context:
space:
mode:
authorJeremy Rimpo <jrim@rimpo.org>2017-11-30 16:37:14 -0600
committerJeremy Rimpo <jrim@rimpo.org>2017-11-30 16:37:14 -0600
commitd7bc542b3d1a96a546d48850e61d3ecdc953c4cc (patch)
tree8a02758752b525a32876a687ae207962b7e5be9a /src/mainwindow.cpp
parent977d562976a06b9d98e08197d28dfca7cb3d229e (diff)
Implement mod/plugin highlighting when pair is selected
Diffstat (limited to 'src/mainwindow.cpp')
-rw-r--r--src/mainwindow.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp
index 0a6e32c3..84860767 100644
--- a/src/mainwindow.cpp
+++ b/src/mainwindow.cpp
@@ -357,6 +357,9 @@ MainWindow::MainWindow(QSettings &initSettings
connect(this, SIGNAL(styleChanged(QString)), this, SLOT(updateStyle(QString)));
+ connect(ui->espList->selectionModel(), SIGNAL(selectionChanged(QItemSelection, QItemSelection)), this, SLOT(esplistSelectionsChanged(QItemSelection)));
+ connect(ui->modList->selectionModel(), SIGNAL(selectionChanged(QItemSelection, QItemSelection)), this, SLOT(modlistSelectionsChanged(QItemSelection)));
+
m_UpdateProblemsTimer.setSingleShot(true);
connect(&m_UpdateProblemsTimer, SIGNAL(timeout()), this, SLOT(updateProblemsButton()));
@@ -2121,6 +2124,18 @@ void MainWindow::modlistSelectionChanged(const QModelIndex &current, const QMode
ui->modList->verticalScrollBar()->repaint();
}
+void MainWindow::modlistSelectionsChanged(const QItemSelection &selected)
+{
+ m_OrganizerCore.pluginList()->highlightPlugins(selected, *m_OrganizerCore.directoryStructure());
+ ui->espList->verticalScrollBar()->repaint();
+}
+
+void MainWindow::esplistSelectionsChanged(const QItemSelection &selected)
+{
+ m_OrganizerCore.modList()->highlightMods(selected, *m_OrganizerCore.directoryStructure());
+ ui->modList->verticalScrollBar()->repaint();
+}
+
void MainWindow::modListSortIndicatorChanged(int, Qt::SortOrder)
{
ui->modList->verticalScrollBar()->repaint();