From b0ec7146a060b6326dd6347760ad010571707497 Mon Sep 17 00:00:00 2001 From: Joakim Bygdell Date: Sat, 28 Jan 2017 12:16:45 +0100 Subject: Ignore double clicks on the divelist Fixes #170 on GitHub Simple catch function for double click events in the divelist, prevents users from trying to edit the divenumber ithe wrong way. Signed-off-by: Joakim Bygdell --- desktop-widgets/divelistview.cpp | 5 +++++ desktop-widgets/divelistview.h | 1 + 2 files changed, 6 insertions(+) diff --git a/desktop-widgets/divelistview.cpp b/desktop-widgets/divelistview.cpp index b6dfe1315..4a7a3cfda 100644 --- a/desktop-widgets/divelistview.cpp +++ b/desktop-widgets/divelistview.cpp @@ -1034,3 +1034,8 @@ void DiveListView::updateLastImageTimeOffset(const int offset) s.beginGroup("MainWindow"); s.setValue("LastImageTimeOffset", offset); } + +void DiveListView::mouseDoubleClickEvent(QMouseEvent * event) +{ + return; +} diff --git a/desktop-widgets/divelistview.h b/desktop-widgets/divelistview.h index 2554725b7..fc8e48f31 100644 --- a/desktop-widgets/divelistview.h +++ b/desktop-widgets/divelistview.h @@ -21,6 +21,7 @@ class DiveListView : public QTreeView { public: DiveListView(QWidget *parent = 0); ~DiveListView(); + void mouseDoubleClickEvent(QMouseEvent * event); void selectionChanged(const QItemSelection &selected, const QItemSelection &deselected); void currentChanged(const QModelIndex ¤t, const QModelIndex &previous); void reload(DiveTripModel::Layout layout, bool forceSort = true); -- cgit v1.2.3-70-g09d2