aboutsummaryrefslogtreecommitdiffstats
path: root/qt-ui
diff options
context:
space:
mode:
Diffstat (limited to 'qt-ui')
-rw-r--r--qt-ui/profile/profilewidget2.cpp12
-rw-r--r--qt-ui/profile/profilewidget2.h1
2 files changed, 12 insertions, 1 deletions
diff --git a/qt-ui/profile/profilewidget2.cpp b/qt-ui/profile/profilewidget2.cpp
index b949cd9f0..251ea383a 100644
--- a/qt-ui/profile/profilewidget2.cpp
+++ b/qt-ui/profile/profilewidget2.cpp
@@ -351,7 +351,7 @@ ProfileWidget2::ProfileWidget2(QWidget *parent) :
// Starting the transitions:
stateMachine->start();
-
+ scene()->installEventFilter(this);
#ifndef QT_NO_DEBUG
QTableView *diveDepthTableView = new QTableView();
diveDepthTableView->setModel(dataModel);
@@ -535,3 +535,13 @@ void ProfileWidget2::mouseMoveEvent(QMouseEvent* event)
}
}
+bool ProfileWidget2::eventFilter(QObject *object, QEvent *event)
+{
+ QGraphicsScene *s = qobject_cast<QGraphicsScene*>(object);
+ if (s && event->type() == QEvent::GraphicsSceneHelp){
+ event->ignore();
+ return true;
+ }
+ return QGraphicsView::eventFilter(object, event);
+}
+
diff --git a/qt-ui/profile/profilewidget2.h b/qt-ui/profile/profilewidget2.h
index 2b0cf0597..d2fbb2b65 100644
--- a/qt-ui/profile/profilewidget2.h
+++ b/qt-ui/profile/profilewidget2.h
@@ -51,6 +51,7 @@ public:
ProfileWidget2(QWidget *parent);
void plotDives(QList<dive*> dives);
+ virtual bool eventFilter(QObject*, QEvent*);
public slots: // Necessary to call from QAction's signals.
void settingsChanged();