graphic code brush

This commit is contained in:
2020-12-06 13:10:02 +03:00
parent 2dba039fb6
commit 5408ad7178

View File

@@ -484,14 +484,14 @@ void Graphic::canvasMouseDoubleClickEvent(QMouseEvent * ) {
void Graphic::canvasWheelEvent(QWheelEvent * e) {
#if (QT_VERSION >= QT_VERSION_CHECK(5, 14, 0))
emit graphicWheelEvent(canvas2real(e->position()), e->delta()/* TODO: test use angleDelta()*/);
emit graphicWheelEvent(canvas2real(e->position()), e->angleDelta().y()/* TODO: test use angleDelta()*/);
#else
emit graphicWheelEvent(canvas2real(QPointF(e->pos())), e->delta());
#endif
if (gestures) return;
if (!navigation) return;
#if (QT_VERSION >= QT_VERSION_CHECK(5, 14, 0))
procZoom(e->position(), e->delta(), e->modifiers());
procZoom(e->position(), e->angleDelta().y(), e->modifiers());
#else
procZoom(e->pos(), e->delta(), e->modifiers());
#endif