diff options
| author | Al12rs <gabriel.cortesi@outlook.com> | 2018-08-01 17:18:07 +0200 |
|---|---|---|
| committer | Al12rs <gabriel.cortesi@outlook.com> | 2018-08-01 17:18:07 +0200 |
| commit | 696bb3bc47daf7779a0520dba64affaac3a5b4ad (patch) | |
| tree | 42c0fa69aad06a779015a0d5fde9654cf2d8fbcb /src/mainwindow.cpp | |
| parent | 10be66a62a6d719355d6a494d365e4ea4dac1e9e (diff) | |
Added CTRL+Double Click on Modlist to open in Explorer
Diffstat (limited to 'src/mainwindow.cpp')
| -rw-r--r-- | src/mainwindow.cpp | 32 |
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());
+ }
}
}
|
