diff --git a/qad/blockview/blockview.cpp b/qad/blockview/blockview.cpp index 17b2fb9..c7b66e7 100644 --- a/qad/blockview/blockview.cpp +++ b/qad/blockview/blockview.cpp @@ -604,10 +604,12 @@ void BlockView::wheelEvent(QWheelEvent * e) { if (!is_nav_anim || (nav_anim.state() != QPropertyAnimation::Running)) nav_target = _nav(); QRectF r = nav_target; - double cx = double(e->pos().x()) / viewport()->width(), cy = double(e->pos().y()) / viewport()->height(); + double vw = viewport()->width(), vh = viewport()->height(); + double cx = double(e->pos().x()) / vw, cy = double(e->pos().y()) / vh; double pw = r.width(), ph = r.height(); r.setWidth(r.width() * scl); - r.setHeight(r.height() * scl); + //r.setHeight(r.height() * scl); + r.setHeight(r.width() * vh / vw); r.translate(cx * (pw - r.width()), cy * (ph - r.height())); animateNav(r); return;