From 3161bdb9a5b07ca73ab5c216920ddd420f5b4738 Mon Sep 17 00:00:00 2001 From: Al12rs Date: Fri, 21 Dec 2018 01:05:30 +0100 Subject: Made doubleclick open relevant info tab --- src/mainwindow.cpp | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'src/mainwindow.cpp') diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index 954c88c6..2e795c90 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -3215,7 +3215,17 @@ void MainWindow::on_modList_doubleClicked(const QModelIndex &index) else { try { m_ContextRow = m_ModListSortProxy->mapToSource(index).row(); - displayModInformation(sourceIdx.row()); + sourceIdx.column(); + int tab = -1; + switch (sourceIdx.column()) { + case ModList::COL_NOTES: tab = ModInfoDialog::TAB_NOTES; break; + case ModList::COL_VERSION: tab = ModInfoDialog::TAB_NEXUS; break; + case ModList::COL_MODID: tab = ModInfoDialog::TAB_NEXUS; break; + case ModList::COL_GAME: tab = ModInfoDialog::TAB_NEXUS; break; + case ModList::COL_CATEGORY: tab = ModInfoDialog::TAB_CATEGORIES; break; + default: tab = -1; + } + displayModInformation(sourceIdx.row(), tab); // workaround to cancel the editor that might have opened because of // selection-click ui->modList->closePersistentEditor(index); -- cgit v1.3.1