mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-27 03:36:39 +00:00
Fix ScrollBarAsNeeded
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@25338 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
2a1b0968cb
commit
c75ff524bf
@ -314,7 +314,7 @@ GuiWorkArea::~GuiWorkArea()
|
||||
void GuiWorkArea::fixVerticalScrollBar()
|
||||
{
|
||||
if (!isFullScreen())
|
||||
setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOn);
|
||||
setVerticalScrollBarPolicy(Qt::ScrollBarAsNeeded);
|
||||
}
|
||||
|
||||
|
||||
@ -569,13 +569,13 @@ void GuiWorkArea::toggleCursor()
|
||||
void GuiWorkArea::updateScrollbar()
|
||||
{
|
||||
ScrollbarParameters const & scroll_ = buffer_view_->scrollbarParameters();
|
||||
|
||||
// Block the scrollbar signal to prevent recursive signal/slot calling.
|
||||
verticalScrollBar()->blockSignals(true);
|
||||
// WARNING: don't touch at the scrollbar value like this:
|
||||
// verticalScrollBar()->setValue(scroll_.position);
|
||||
// because this would cause a recursive signal/slot calling with
|
||||
// GuiWorkArea::scrollTo
|
||||
verticalScrollBar()->setRange(scroll_.min, scroll_.max);
|
||||
verticalScrollBar()->setPageStep(scroll_.page_step);
|
||||
verticalScrollBar()->setSingleStep(scroll_.single_step);
|
||||
verticalScrollBar()->setValue(scroll_.position);
|
||||
verticalScrollBar()->setSliderPosition(scroll_.position);
|
||||
verticalScrollBar()->blockSignals(false);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user