]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/qt4/GuiWorkArea.cpp
some remnaming
[lyx.git] / src / frontends / qt4 / GuiWorkArea.cpp
index ec30f9b2d71fd01f593e01016efc82b97bcbe85f..a61d31309a7026098bb4bbae0aeb23c74d7d74f1 100644 (file)
@@ -241,9 +241,22 @@ void GuiWorkArea::setScrollbarParams(int h, int scroll_pos, int scroll_line_step
 }
 
 
-void GuiWorkArea::adjustViewWithScrollBar(int)
+void GuiWorkArea::adjustViewWithScrollBar(int action)
 {
-       scrollBufferView(verticalScrollBar()->sliderPosition());
+       stopBlinkingCursor();
+       if (action == QAbstractSlider::SliderPageStepAdd)
+               buffer_view_->scrollDown(viewport()->height());
+       else if (action == QAbstractSlider::SliderPageStepSub)
+               buffer_view_->scrollUp(viewport()->height());
+       else
+               buffer_view_->scrollDocView(verticalScrollBar()->sliderPosition());
+
+       if (lyxrc.cursor_follows_scrollbar) {
+               buffer_view_->setCursorFromScrollbar();
+               lyx_view_->updateLayoutChoice();
+       }
+       // Show the cursor immediately after any operation.
+       startBlinkingCursor();
        QApplication::syncX();
 }