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

This commit is contained in:
2019-03-03 17:04:55 +00:00
parent dba3fbf1f1
commit 77e7fe8e64

View File

@@ -1826,7 +1826,10 @@ void BlockView::_setNav(QRectF v) {
if (vw < 1. || vh < 1. || v.isEmpty()) return;
QTransform matrix;
double scl = qMin(vw / v.width(), vh / v.height());
double ascl = appScale(this);
scl = qMin(qMax(scl, 0.02 * ascl), 50. * ascl);
matrix.scale(scl, scl);
//qDebug() << scl;
QGraphicsView::setTransform(matrix);
QGraphicsView::centerOn(v.center());
}