summaryrefslogtreecommitdiff
path: root/src/mainwindow.cpp
diff options
context:
space:
mode:
authorMikaël Capelle <capelle.mikael@gmail.com>2020-12-31 22:30:19 +0100
committerMikaël Capelle <capelle.mikael@gmail.com>2021-01-02 15:38:18 +0100
commitb5ce6eb8e7ba67f15dcffe0639d7012088c53ebe (patch)
tree20fdde00677a8f41b59205860ca38ae17ad69a8b /src/mainwindow.cpp
parentbd34b532230d92bd6232ceb1ab2b0092cac79d22 (diff)
Move open-explorer key combination to views.
Diffstat (limited to 'src/mainwindow.cpp')
-rw-r--r--src/mainwindow.cpp42
1 files changed, 0 insertions, 42 deletions
diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp
index a530fbf4..9b254250 100644
--- a/src/mainwindow.cpp
+++ b/src/mainwindow.cpp
@@ -450,9 +450,6 @@ MainWindow::MainWindow(Settings &settings
connect(ui->espList->selectionModel(), SIGNAL(selectionChanged(QItemSelection, QItemSelection)), this, SLOT(esplistSelectionsChanged(QItemSelection)));
- new QShortcut(QKeySequence(Qt::CTRL + Qt::Key_Enter), this, SLOT(openExplorer_activated()));
- new QShortcut(QKeySequence(Qt::CTRL + Qt::Key_Return), this, SLOT(openExplorer_activated()));
-
setFilterShortcuts(ui->modList, ui->modFilterEdit);
setFilterShortcuts(ui->espList, ui->espFilterEdit);
setFilterShortcuts(ui->downloadView, ui->downloadFilterEdit);
@@ -2340,45 +2337,6 @@ void MainWindow::setWindowEnabled(bool enabled)
setEnabled(enabled);
}
-void MainWindow::openExplorer_activated()
-{
- if (ui->modList->hasFocus()) {
- QItemSelectionModel *selection = ui->modList->selectionModel();
- if (selection->hasSelection() && selection->selectedRows().count() == 1 ) {
-
- QModelIndex idx = selection->currentIndex();
- ModInfo::Ptr modInfo = ModInfo::getByIndex(idx.data(ModList::IndexRole).toInt());
- std::vector<ModInfo::EFlag> flags = modInfo->getFlags();
-
- if (modInfo->isRegular() || (std::find(flags.begin(), flags.end(), ModInfo::FLAG_OVERWRITE) != flags.end())) {
- shell::Explore(modInfo->absolutePath());
- }
-
- }
- }
-
- if (ui->espList->hasFocus()) {
- QItemSelectionModel *selection = ui->espList->selectionModel();
-
- if (selection->hasSelection() && selection->selectedRows().count() == 1) {
-
- QModelIndex idx = selection->currentIndex();
- QString fileName = idx.data().toString();
-
-
- unsigned int modInfoIndex = ModInfo::getIndex(m_OrganizerCore.pluginList()->origin(fileName));
- if (modInfoIndex != UINT_MAX) {
- ModInfo::Ptr modInfo = ModInfo::getByIndex(modInfoIndex);
- std::vector<ModInfo::EFlag> flags = modInfo->getFlags();
-
- if (modInfo->isRegular() || (std::find(flags.begin(), flags.end(), ModInfo::FLAG_OVERWRITE) != flags.end())) {
- shell::Explore(modInfo->absolutePath());
- }
- }
- }
- }
-}
-
void MainWindow::refreshProfile_activated()
{
m_OrganizerCore.profileRefresh();