From 9c4adc8779b147fa2a2799df391ccb28eb4ea13d Mon Sep 17 00:00:00 2001 From: Rafael Date: Sun, 3 Apr 2016 05:49:18 +0200 Subject: [PATCH] view in single click if not in selection mode --- SavegameWidget.cpp | 7 +++++++ SnapmaticWidget.cpp | 7 +++++++ 2 files changed, 14 insertions(+) diff --git a/SavegameWidget.cpp b/SavegameWidget.cpp index 4574c16..3a24d3c 100755 --- a/SavegameWidget.cpp +++ b/SavegameWidget.cpp @@ -134,6 +134,13 @@ void SavegameWidget::mouseReleaseEvent(QMouseEvent *ev) QTimer::singleShot(QApplication::doubleClickInterval(), this, SLOT(changeCheckedState())); } } + else + { + if (rect().contains(ev->pos()) && ev->button() == Qt::LeftButton) + { + on_cmdView_clicked(); + } + } } void SavegameWidget::mouseDoubleClickEvent(QMouseEvent *ev) diff --git a/SnapmaticWidget.cpp b/SnapmaticWidget.cpp index b28ddfe..9ef52d4 100755 --- a/SnapmaticWidget.cpp +++ b/SnapmaticWidget.cpp @@ -132,6 +132,13 @@ void SnapmaticWidget::mouseReleaseEvent(QMouseEvent *ev) QTimer::singleShot(QApplication::doubleClickInterval(), this, SLOT(changeCheckedState())); } } + else + { + if (rect().contains(ev->pos()) && ev->button() == Qt::LeftButton) + { + on_cmdView_clicked(); + } + } } void SnapmaticWidget::mouseDoubleClickEvent(QMouseEvent *ev)