From 75e7968ae591208229a0077ab830c3d30dcf0808 Mon Sep 17 00:00:00 2001 From: Marco Martin Date: Mon, 8 Jun 2009 21:06:23 +0000 Subject: [PATCH] don't make a loop of scrollbar updating->position updating svn path=/trunk/KDE/kdelibs/; revision=979074 --- widgets/scrollwidget.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/widgets/scrollwidget.cpp b/widgets/scrollwidget.cpp index 9e50ddfb2..def6b1d2f 100644 --- a/widgets/scrollwidget.cpp +++ b/widgets/scrollwidget.cpp @@ -270,8 +270,12 @@ bool ScrollWidget::eventFilter(QObject *watched, QEvent *event) d->adjustScrollbars(); d->adjustClipping(); } else if (watched == d->widget && event->type() == QEvent::GraphicsSceneMove) { + d->horizontalScrollBar->blockSignals(true); + d->verticalScrollBar->blockSignals(true); d->horizontalScrollBar->setValue(-d->widget->pos().x()/10); d->verticalScrollBar->setValue(-d->widget->pos().y()/10); + d->horizontalScrollBar->blockSignals(false); + d->verticalScrollBar->blockSignals(false); } return false;