]> git.lyx.org Git - features.git/commitdiff
* The BufferView sets up its scrollbar data when it first gets its
authorStefan Schimanski <sts@lyx.org>
Tue, 5 Feb 2008 13:17:05 +0000 (13:17 +0000)
committerStefan Schimanski <sts@lyx.org>
Tue, 5 Feb 2008 13:17:05 +0000 (13:17 +0000)
  actual size via a resize event. So make sure the GuiWorkArea also
  updates the GUI scrollbars.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22787 a592a061-630c-0410-9148-cb99ea01b6c8

src/frontends/qt4/GuiWorkArea.cpp

index 5b7dfb0857376ca52e411faf05758ff1f7ed88a9..9e0f56a5aa89710520d446f0fa3e134a738a8b1d 100644 (file)
@@ -761,6 +761,14 @@ void GuiWorkArea::paintEvent(QPaintEvent * ev)
        if (need_resize_) {
                screen_ = QPixmap(viewport()->width(), viewport()->height());
                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();
                showCursor();