diff options
| author | Al12rs <gabriel.cortesi@outlook.com> | 2018-12-21 01:05:30 +0100 |
|---|---|---|
| committer | Al12rs <gabriel.cortesi@outlook.com> | 2018-12-21 01:05:30 +0100 |
| commit | 3161bdb9a5b07ca73ab5c216920ddd420f5b4738 (patch) | |
| tree | b0fa628c23589161f3c9ee7dfbd4ab9857326f45 /src/mainwindow.cpp | |
| parent | 63efd21a6a8597f961d1c0a8b7f41510d434fd32 (diff) | |
Made doubleclick open relevant info tab
Diffstat (limited to 'src/mainwindow.cpp')
| -rw-r--r-- | src/mainwindow.cpp | 12 |
1 files changed, 11 insertions, 1 deletions
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);
|
