summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAl12rs <gabriel.cortesi@outlook.com>2018-08-01 17:18:07 +0200
committerAl12rs <gabriel.cortesi@outlook.com>2018-08-01 17:18:07 +0200
commit696bb3bc47daf7779a0520dba64affaac3a5b4ad (patch)
tree42c0fa69aad06a779015a0d5fde9654cf2d8fbcb
parent10be66a62a6d719355d6a494d365e4ea4dac1e9e (diff)
Added CTRL+Double Click on Modlist to open in Explorer
-rw-r--r--src/mainwindow.cpp32
1 files changed, 24 insertions, 8 deletions
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());
+ }
}
}