Fix scrollbar/resizing interaction.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23079 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Abdelrazak Younes 2008-02-20 15:37:17 +00:00
parent 7d6ee1572e
commit 6069c5ad16
2 changed files with 8 additions and 14 deletions

View File

@ -1887,11 +1887,6 @@ void GuiView::lfunUiToggle(FuncRequest const & cmd)
showFullScreen(); showFullScreen();
statusBar()->hide(); statusBar()->hide();
menuBar()->hide(); menuBar()->hide();
if (d.current_work_area_) {
// It seems there is a bug somewhere preventing the scrollbar to
// show up with updated parameters. This work-around seems to work.
d.current_work_area_->verticalScrollBar()->show();
}
} }
} }

View File

@ -408,6 +408,14 @@ void GuiWorkArea::resizeBufferView()
// We are already inside a paint event. // We are already inside a paint event.
lyx_view_->setBusy(true); lyx_view_->setBusy(true);
buffer_view_->resize(viewport()->width(), viewport()->height()); buffer_view_->resize(viewport()->width(), viewport()->height());
updateScreen();
// Update scrollbars which might have changed due different
// BufferView dimension. This is especially important when the
// BufferView goes from zero-size to the real-size for the first time,
// as the scrollbar paramters are then set for the first time.
updateScrollbar();
lyx_view_->updateLayoutList(); lyx_view_->updateLayoutList();
lyx_view_->setBusy(false); lyx_view_->setBusy(false);
need_resize_ = false; need_resize_ = false;
@ -772,15 +780,6 @@ void GuiWorkArea::paintEvent(QPaintEvent * ev)
if (need_resize_) { if (need_resize_) {
screen_ = QPixmap(viewport()->width(), viewport()->height()); screen_ = QPixmap(viewport()->width(), viewport()->height());
resizeBufferView(); resizeBufferView();
// Update scrollbars which might have changed due different
// BufferView dimension. This is especially important when the
// BufferView goes from zero-size to the real-size for the first time,
// as the scrollbar paramters are then set for the first time.
updateScrollbar();
BOOST_ASSERT(need_resize_ == false);
updateScreen();
hideCursor(); hideCursor();
showCursor(); showCursor();
} }