git-svn-id: svn://db.shs.com.ru/libs@522 a8b55f48-bf90-11e4-a774-851b48703e85

This commit is contained in:
2019-04-08 15:44:30 +00:00
parent 6a6371bb11
commit 3712b42f92

View File

@@ -217,7 +217,7 @@ void Graphic::procGesture(QGesture * g) {
Qt::KeyboardModifiers km = Qt::NoModifier;
if (gesture_angle <= 20.) km = Qt::ControlModifier;
if (gesture_angle >= 70.) km = Qt::ShiftModifier;
procZoom(pg->centerPoint(), (pg->scaleFactor() - 1.) * 300., km);
procZoom(pg->centerPoint(), (pg->scaleFactor() - 1.) * 500., km);
totalUpdate();
} break;
case Qt::TapAndHoldGesture: {
@@ -238,7 +238,7 @@ void Graphic::procZoom(QPointF view_center, double dzoom, Qt::KeyboardModifiers
double px = view_center.x() - gridborder.x() - margins_.left(), py = hei - view_center.y() + margins_.height();
px = px / wid * selrect.width() + selrect.x();
py = py / hei * selrect.height() + selrect.y();
scl = 1. - dzoom / 300.;
scl = 1. - dzoom / 500.;
if (km == Qt::NoModifier)
selrect.setRect(px - (px - selrect.x()) * scl, py - (py - selrect.y()) * scl, selrect.width() * scl, selrect.height() * scl);
else {