diff options
| author | Al12rs <gabriel.cortesi@outlook.com> | 2018-07-18 12:03:02 +0200 |
|---|---|---|
| committer | Al12rs <gabriel.cortesi@outlook.com> | 2018-07-18 12:03:02 +0200 |
| commit | ce2494ba200a6da56634aa3e6cdb6e22884a56e6 (patch) | |
| tree | dacfe77d4957e94d1c34434e436969364024d86d /src/mainwindow.cpp | |
| parent | d5f3bee642f6ab25f10d0ba34d6f85d4876fcf2d (diff) | |
Don't show info dialog for unmanaged pluugins.
Diffstat (limited to 'src/mainwindow.cpp')
| -rw-r--r-- | src/mainwindow.cpp | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index c4e888ac..2e14a201 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -2896,13 +2896,20 @@ void MainWindow::on_espList_doubleClicked(const QModelIndex &index) QModelIndex idx = selection->currentIndex();
QString fileName = idx.data().toString();
+ if (ModInfo::getIndex(m_OrganizerCore.pluginList()->origin(fileName)) == UINT_MAX)
+ return;
+
+ ModInfo::Ptr modInfo = ModInfo::getByIndex(ModInfo::getIndex(m_OrganizerCore.pluginList()->origin(fileName)));
+ std::vector<ModInfo::EFlag> flags = modInfo->getFlags();
- displayModInformation(ModInfo::getIndex(m_OrganizerCore.pluginList()->origin(fileName)));
- // workaround to cancel the editor that might have opened because of
- // selection-click
- ui->espList->closePersistentEditor(index);
-
+ if (modInfo->isRegular() || (std::find(flags.begin(), flags.end(), ModInfo::FLAG_OVERWRITE) != flags.end())) {
+ displayModInformation(ModInfo::getIndex(m_OrganizerCore.pluginList()->origin(fileName)));
+ // workaround to cancel the editor that might have opened because of
+ // selection-click
+ ui->espList->closePersistentEditor(index);
+
+ }
}
}
catch (const std::exception &e) {
|
