summaryrefslogtreecommitdiffstats
path: root/application/groupview/GroupView.cpp
diff options
context:
space:
mode:
authorPetr Mrázek <peterix@gmail.com>2018-11-22 02:02:53 +0100
committerPetr Mrázek <peterix@gmail.com>2018-11-22 02:02:53 +0100
commit74c598d756107be817989d87bd4ccf9d1a182e90 (patch)
tree00659a8f01f9b00879701ecef0703d00168232dd /application/groupview/GroupView.cpp
parentc214c13fb353ef68718e7bca6fd784037d262c91 (diff)
downloadMultiMC-74c598d756107be817989d87bd4ccf9d1a182e90.tar
MultiMC-74c598d756107be817989d87bd4ccf9d1a182e90.tar.gz
MultiMC-74c598d756107be817989d87bd4ccf9d1a182e90.tar.lz
MultiMC-74c598d756107be817989d87bd4ccf9d1a182e90.tar.xz
MultiMC-74c598d756107be817989d87bd4ccf9d1a182e90.zip
GH-2101 fix enter and double click activation of instances
Diffstat (limited to 'application/groupview/GroupView.cpp')
-rw-r--r--application/groupview/GroupView.cpp6
1 files changed, 6 insertions, 0 deletions
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)