Skip to content

Commit

Permalink
resolved #146
Browse files Browse the repository at this point in the history
  • Loading branch information
jurplel committed Sep 1, 2018
1 parent b4229ae commit 7f7d93b
Showing 1 changed file with 14 additions and 4 deletions.
18 changes: 14 additions & 4 deletions src/qvgraphicsview.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -107,10 +107,21 @@ void QVGraphicsView::wheelEvent(QWheelEvent *event)
}
else if (event->modifiers() == (Qt::ControlModifier | Qt::ShiftModifier))
{
if (event->angleDelta().x() > 0)
translate(width()/10, 0);
if (event->angleDelta().x() != 0)
{
if (event->angleDelta().x() > 0)
translate(width()/10, 0);
else
translate(width()/10*-1, 0);
}
else
translate(width()/10*-1, 0);
{
if (event->angleDelta().y() > 0)
translate(width()/10, 0);
else
translate(width()/10*-1, 0);
}

}
else
{
Expand Down Expand Up @@ -245,7 +256,6 @@ void QVGraphicsView::zoom(int DeltaY, QPoint pos)
result = loadedPixmapItem->boundingRect().center();
}
centerOn(result);
qDebug() << fittedHeight << loadedPixmapItem->boundingRect().height() << getCurrentScale();
}

void QVGraphicsView::loadMimeData(const QMimeData *mimeData)
Expand Down

0 comments on commit 7f7d93b

Please sign in to comment.