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

This commit is contained in:
2019-03-04 14:26:26 +00:00
parent 8874a626c1
commit e4dfe7db07
2 changed files with 4 additions and 3 deletions

View File

@@ -76,6 +76,8 @@ void BlockView::_init() {
connect(&nav_anim, SIGNAL(finished()), this, SLOT(_navFinished()));
connect(scene_, SIGNAL(sceneRectChanged(QRectF)), this, SLOT(adjustThumb()));
connect(scene_, SIGNAL(selectionChanged()), this, SLOT(sceneSelectionChanged()));
connect(horizontalScrollBar(), SIGNAL(valueChanged(int)), this, SLOT(updateNavRect()));
connect(verticalScrollBar(), SIGNAL(valueChanged(int)), this, SLOT(updateNavRect()));
centerOn(scene_->sceneRect().center());
setCacheMode(CacheBackground);
setTransformationAnchor(QGraphicsView::AnchorUnderMouse);
@@ -1853,7 +1855,7 @@ void BlockView::_setNav(QRectF v) {
matrix.scale(scl, scl);
nav_rect = v;
QGraphicsView::setTransform(matrix);
QGraphicsView::centerOn(nav_rect.center());
QGraphicsView::centerOn(v.center());
}