graphic code brush
This commit is contained in:
@@ -484,14 +484,14 @@ void Graphic::canvasMouseDoubleClickEvent(QMouseEvent * ) {
|
|||||||
|
|
||||||
void Graphic::canvasWheelEvent(QWheelEvent * e) {
|
void Graphic::canvasWheelEvent(QWheelEvent * e) {
|
||||||
#if (QT_VERSION >= QT_VERSION_CHECK(5, 14, 0))
|
#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
|
#else
|
||||||
emit graphicWheelEvent(canvas2real(QPointF(e->pos())), e->delta());
|
emit graphicWheelEvent(canvas2real(QPointF(e->pos())), e->delta());
|
||||||
#endif
|
#endif
|
||||||
if (gestures) return;
|
if (gestures) return;
|
||||||
if (!navigation) return;
|
if (!navigation) return;
|
||||||
#if (QT_VERSION >= QT_VERSION_CHECK(5, 14, 0))
|
#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
|
#else
|
||||||
procZoom(e->pos(), e->delta(), e->modifiers());
|
procZoom(e->pos(), e->delta(), e->modifiers());
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Reference in New Issue
Block a user