From 114e7359cd81b743e297358be0718f5c8edfcebf Mon Sep 17 00:00:00 2001 From: Gary Wang Date: Sun, 4 Apr 2021 11:17:44 +0800 Subject: [PATCH] misc: don't call parent method since we don't need --- app/navigatorview.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/app/navigatorview.cpp b/app/navigatorview.cpp index 3882cdd..63917fa 100644 --- a/app/navigatorview.cpp +++ b/app/navigatorview.cpp @@ -44,7 +44,7 @@ void NavigatorView::mousePressEvent(QMouseEvent *event) update(); } - return QGraphicsView::mousePressEvent(event); + event->accept(); } void NavigatorView::mouseMoveEvent(QMouseEvent *event) @@ -52,16 +52,17 @@ void NavigatorView::mouseMoveEvent(QMouseEvent *event) if (m_mouseDown && m_mainView) { m_mainView->centerOn(mapToScene(event->pos())); update(); + event->accept(); + } else { + event->ignore(); } - - return QGraphicsView::mouseMoveEvent(event); } void NavigatorView::mouseReleaseEvent(QMouseEvent *event) { m_mouseDown = false; - return QGraphicsView::mouseReleaseEvent(event); + event->accept(); } void NavigatorView::wheelEvent(QWheelEvent *event)