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

This commit is contained in:
2019-03-05 08:37:08 +00:00
parent 892bd861bb
commit 1e478ee19a
2 changed files with 9 additions and 1 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(scrolled()));
connect(verticalScrollBar(), SIGNAL(valueChanged(int)), this, SLOT(scrolled()));
centerOn(scene_->sceneRect().center());
setCacheMode(CacheBackground);
setTransformationAnchor(QGraphicsView::AnchorUnderMouse);
@@ -697,6 +699,11 @@ void BlockView::updateNavRect() {
}
void BlockView::scrolled() {
updateNavRect();
}
void BlockView::mouseMoveEvent(QMouseEvent * event) {
if (navigation) {
if (event->buttons().testFlag(Qt::MidButton) || event->buttons().testFlag(Qt::RightButton)) {