summaryrefslogtreecommitdiffstats
path: root/qt-ui
diff options
context:
space:
mode:
authorGravatar Tomaz Canabrava <tcanabrava@kde.org>2013-05-10 12:00:56 -0300
committerGravatar Dirk Hohndel <dirk@hohndel.org>2013-05-10 08:19:38 -0700
commit9a403330673ffe1812a46e2afe4f473ca39f672b (patch)
treeed2fdce4c264ce8f396a99568637ba12a65439f3 /qt-ui
parentea5353025f58aaaf31d7cf9d1ca92c93d9357c16 (diff)
downloadsubsurface-9a403330673ffe1812a46e2afe4f473ca39f672b.tar.gz
Fix showing the stuff on the canvas in the right positions.
Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Diffstat (limited to 'qt-ui')
-rw-r--r--qt-ui/profilegraphics.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/qt-ui/profilegraphics.cpp b/qt-ui/profilegraphics.cpp
index aeeccc875..71aebd19f 100644
--- a/qt-ui/profilegraphics.cpp
+++ b/qt-ui/profilegraphics.cpp
@@ -163,9 +163,8 @@ void ProfileGraphicsView::mouseMoveEvent(QMouseEvent* event)
ensureVisible(event->pos().x(), event->pos().y(), 10, 10, 100, 100);
toolTip->setPos(mapToScene(toolTipPos).x(), mapToScene(toolTipPos).y());
- if (zoomLevel < 0){
+ if (zoomLevel < 0)
QGraphicsView::mouseMoveEvent(event);
- }
}
bool ProfileGraphicsView::eventFilter(QObject* obj, QEvent* event)
@@ -322,8 +321,7 @@ void ProfileGraphicsView::plot(struct dive *d)
}
#endif
- QRectF curerntRect = scene()->itemsBoundingRect();
- scene()->setSceneRect( -10, -10, curerntRect.width() + 10, curerntRect.height() +10 );
+ scene()->setSceneRect(scene()->itemsBoundingRect());
}
void ProfileGraphicsView::plot_depth_scale()