From 696bb3bc47daf7779a0520dba64affaac3a5b4ad Mon Sep 17 00:00:00 2001 From: Al12rs Date: Wed, 1 Aug 2018 17:18:07 +0200 Subject: Added CTRL+Double Click on Modlist to open in Explorer --- src/mainwindow.cpp | 32 ++++++++++++++++++++++++-------- 1 file changed, 24 insertions(+), 8 deletions(-) (limited to 'src') diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index f587cc50..d3e3c613 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -2861,14 +2861,30 @@ void MainWindow::on_modList_doubleClicked(const QModelIndex &index) return; } - try { - m_ContextRow = m_ModListSortProxy->mapToSource(index).row(); - displayModInformation(sourceIdx.row()); - // workaround to cancel the editor that might have opened because of - // selection-click - ui->modList->closePersistentEditor(index); - } catch (const std::exception &e) { - reportError(e.what()); + Qt::KeyboardModifiers modifiers = QApplication::queryKeyboardModifiers(); + if (modifiers.testFlag(Qt::ControlModifier)) { + try { + m_ContextRow = m_ModListSortProxy->mapToSource(index).row(); + openExplorer_clicked(); + // workaround to cancel the editor that might have opened because of + // selection-click + ui->modList->closePersistentEditor(index); + } + catch (const std::exception &e) { + reportError(e.what()); + } + } + else { + try { + m_ContextRow = m_ModListSortProxy->mapToSource(index).row(); + displayModInformation(sourceIdx.row()); + // workaround to cancel the editor that might have opened because of + // selection-click + ui->modList->closePersistentEditor(index); + } + catch (const std::exception &e) { + reportError(e.what()); + } } } -- cgit v1.3.1