From 74c598d756107be817989d87bd4ccf9d1a182e90 Mon Sep 17 00:00:00 2001 From: Petr Mrázek Date: Thu, 22 Nov 2018 02:02:53 +0100 Subject: GH-2101 fix enter and double click activation of instances --- application/groupview/GroupView.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'application/groupview') 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) -- cgit