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

This commit is contained in:
2017-10-21 19:57:18 +00:00
parent ae15212f5a
commit 7154ff838f
7 changed files with 243 additions and 215 deletions

View File

@@ -980,6 +980,24 @@ void BlockView::centerOn(const QGraphicsItem * item) {
}
void BlockView::fitInView(const QRectF & rect, Qt::AspectRatioMode aspectRatioMode) {
QGraphicsView::fitInView(rect, aspectRatioMode);
nav_target = _nav();
}
void BlockView::fitInView(qreal x, qreal y, qreal w, qreal h, Qt::AspectRatioMode aspectRatioMode) {
QGraphicsView::fitInView(x, y, w, h, aspectRatioMode);
nav_target = _nav();
}
void BlockView::fitInView(const QGraphicsItem * item, Qt::AspectRatioMode aspectRatioMode) {
QGraphicsView::fitInView(item, aspectRatioMode);
nav_target = _nav();
}
void BlockView::restoreSelState() {
foreach (QGraphicsItem * i, sel_items) {
i->setPos(i->data(1001).toPointF());
@@ -1521,7 +1539,7 @@ void BlockView::_setThumb(double v) {
void BlockView::_setNav(QRectF v) {
fitInView(v);
QGraphicsView::fitInView(v);
}