Don't zoom the profile when the left button is pressed

This prevents zooming out to more than max in the planner. Using a Mac
MagicMouse it happens at times that the finger slides on the mouse while
dragging a waypoint which can result in zooming out further than max.

Fixes #695

Signed-off-by: Robert C. Helling <helling@atdotde.de>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Robert C. Helling 2014-08-06 13:51:54 +02:00 committed by Dirk Hohndel
parent 9d801c663f
commit 71bed5022c

View file

@ -613,6 +613,8 @@ void ProfileWidget2::wheelEvent(QWheelEvent *event)
if (currentState == EMPTY)
return;
QPoint toolTipPos = mapFromScene(toolTipItem->pos());
if(event->buttons() == Qt::LeftButton)
return;
if (event->delta() > 0 && zoomLevel < 20) {
scale(zoomFactor, zoomFactor);
zoomLevel++;