]> git.sesse.net Git - kdenlive/commitdiff
Zoom to mouse when using CTRL + Wheel in MonitorScene.
authorTill Theato <root@ttill.de>
Sat, 7 Apr 2012 19:43:42 +0000 (21:43 +0200)
committerTill Theato <root@ttill.de>
Sat, 7 Apr 2012 19:43:42 +0000 (21:43 +0200)
src/monitorscene.cpp

index f02505641973b1b16001fa76a7729709646c2a04..089e5e96f1be0c15f9eef27cdfd63122d749767e 100644 (file)
@@ -242,10 +242,13 @@ void MonitorScene::mouseDoubleClickEvent(QGraphicsSceneMouseEvent* event)
 void MonitorScene::wheelEvent(QGraphicsSceneWheelEvent* event)
 {
     if (event->modifiers() == Qt::ControlModifier) {
-        if (event->delta() > 0)
+        if (event->delta() > 0) {
+            m_view->setTransformationAnchor(QGraphicsView::AnchorUnderMouse);
             slotZoomIn(5);
-        else
+            m_view->setTransformationAnchor(QGraphicsView::AnchorViewCenter);
+        } else {
             slotZoomOut(5);
+        }
     } else {
         QGraphicsScene::wheelEvent(event);
     }