git-svn-id: svn://db.shs.com.ru/libs@507 a8b55f48-bf90-11e4-a774-851b48703e85
This commit is contained in:
@@ -1826,7 +1826,10 @@ void BlockView::_setNav(QRectF v) {
|
|||||||
if (vw < 1. || vh < 1. || v.isEmpty()) return;
|
if (vw < 1. || vh < 1. || v.isEmpty()) return;
|
||||||
QTransform matrix;
|
QTransform matrix;
|
||||||
double scl = qMin(vw / v.width(), vh / v.height());
|
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);
|
matrix.scale(scl, scl);
|
||||||
|
//qDebug() << scl;
|
||||||
QGraphicsView::setTransform(matrix);
|
QGraphicsView::setTransform(matrix);
|
||||||
QGraphicsView::centerOn(v.center());
|
QGraphicsView::centerOn(v.center());
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user