diff options
-rw-r--r-- | application/MainWindow.cpp | 2 | ||||
-rw-r--r-- | application/groupview/GroupView.cpp | 6 |
2 files changed, 7 insertions, 1 deletions
diff --git a/application/MainWindow.cpp b/application/MainWindow.cpp index 66e1f141..78b0a907 100644 --- a/application/MainWindow.cpp +++ b/application/MainWindow.cpp @@ -692,7 +692,7 @@ MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new MainWindow setCatBackground(cat_enable); } // start instance when double-clicked - connect(view, &GroupView::doubleClicked, this, &MainWindow::instanceActivated); + connect(view, &GroupView::activated, this, &MainWindow::instanceActivated); // track the selection -- update the instance toolbar connect(view->selectionModel(), &QItemSelectionModel::currentChanged, this, &MainWindow::instanceChanged); diff --git a/application/groupview/GroupView.cpp b/application/groupview/GroupView.cpp index a1b44e64..e61ac898 100644 --- a/application/groupview/GroupView.cpp +++ b/application/groupview/GroupView.cpp @@ -417,6 +417,12 @@ void GroupView::mouseDoubleClickEvent(QMouseEvent *event) // signal handlers may change the model QPersistentModelIndex persistent = index; emit doubleClicked(persistent); + + QStyleOptionViewItem option = viewOptions(); + if ((model()->flags(index) & Qt::ItemIsEnabled) && !style()->styleHint(QStyle::SH_ItemView_ActivateItemOnSingleClick, &option, this)) + { + emit activated(index); + } } void GroupView::paintEvent(QPaintEvent *event) |