]> git.lyx.org Git - features.git/commitdiff
Fix scrollbar/resizing interaction.
authorAbdelrazak Younes <younes@lyx.org>
Wed, 20 Feb 2008 15:37:17 +0000 (15:37 +0000)
committerAbdelrazak Younes <younes@lyx.org>
Wed, 20 Feb 2008 15:37:17 +0000 (15:37 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23079 a592a061-630c-0410-9148-cb99ea01b6c8

src/frontends/qt4/GuiView.cpp
src/frontends/qt4/GuiWorkArea.cpp

index 989f4d92a94cbf4851ab3959a587e52022c42ad6..0f7f16ab1be9934b57ec3e8981c94df27cfd5703 100644 (file)
@@ -1887,11 +1887,6 @@ void GuiView::lfunUiToggle(FuncRequest const & cmd)
                showFullScreen();
                statusBar()->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();
-               }
        }
 }
 
index 42e1903dcf2c262f4b48a9261e22344a83449c32..6f930f61a43f80a08639f7ae3584834913400f4d 100644 (file)
@@ -408,6 +408,14 @@ void GuiWorkArea::resizeBufferView()
        // We are already inside a paint event.
        lyx_view_->setBusy(true);
        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_->setBusy(false);
        need_resize_ = false;
@@ -772,15 +780,6 @@ 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();
        }