Fix recursive repaint. QSlider::setRange() didn't used to trigger valueChanged() signal before to Qt4.4.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@24322 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Abdelrazak Younes 2008-04-18 11:38:02 +00:00
parent f8c19c365d
commit 108bac9798

View File

@ -558,11 +558,11 @@ void GuiWorkArea::updateScrollbar()
{ {
ScrollbarParameters const & scroll_ = buffer_view_->scrollbarParameters(); ScrollbarParameters const & scroll_ = buffer_view_->scrollbarParameters();
// Block the scrollbar signal to prevent recursive signal/slot calling.
verticalScrollBar()->blockSignals(true);
verticalScrollBar()->setRange(scroll_.min, scroll_.max); verticalScrollBar()->setRange(scroll_.min, scroll_.max);
verticalScrollBar()->setPageStep(scroll_.page_step); verticalScrollBar()->setPageStep(scroll_.page_step);
verticalScrollBar()->setSingleStep(scroll_.single_step); verticalScrollBar()->setSingleStep(scroll_.single_step);
// Block the scrollbar signal to prevent recursive signal/slot calling.
verticalScrollBar()->blockSignals(true);
verticalScrollBar()->setValue(scroll_.position); verticalScrollBar()->setValue(scroll_.position);
verticalScrollBar()->setSliderPosition(scroll_.position); verticalScrollBar()->setSliderPosition(scroll_.position);
verticalScrollBar()->blockSignals(false); verticalScrollBar()->blockSignals(false);