|
From: Tapio V. <aa...@us...> - 2011-01-12 21:13:57
|
Module: editor
Branch: master
Commit: ceb5d72598034d08bbae4429df50c68da6552006
Author: Tapio Vierros <tap...@gm...>
Date: Wed Jan 12 23:13:29 2011 +0200
Fix mouse panning.
---
notegraphwidget.cc | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/notegraphwidget.cc b/notegraphwidget.cc
index 5b1a54a..f39e4cf 100644
--- a/notegraphwidget.cc
+++ b/notegraphwidget.cc
@@ -272,8 +272,8 @@ void NoteGraphWidget::mouseMoveEvent(QMouseEvent *event)
if (!m_panHotSpot.isNull()) {
setCursor(QCursor(Qt::ClosedHandCursor));
QScrollArea *scrollArea = NULL;
- if (parentWidget() && parentWidget()->parent())
- scrollArea = qobject_cast<QScrollArea*>(parentWidget()->parent()->parent());
+ if (parentWidget())
+ scrollArea = qobject_cast<QScrollArea*>(parentWidget()->parent());
if (scrollArea) {
QPoint diff = event->pos() - m_panHotSpot;
QScrollBar *scrollHor = scrollArea->horizontalScrollBar();
|