]> git.lyx.org Git - features.git/commitdiff
avoid screen jumps when images get loaded
authorAlfredo Braunstein <abraunst@lyx.org>
Tue, 2 Sep 2003 11:10:19 +0000 (11:10 +0000)
committerAlfredo Braunstein <abraunst@lyx.org>
Tue, 2 Sep 2003 11:10:19 +0000 (11:10 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@7634 a592a061-630c-0410-9148-cb99ea01b6c8

src/BufferView_pimpl.C
src/ChangeLog

index e7c10f33fdadc5bdfab4767e7af4e855c47f581a..296b9d61d10f7db91aee1d783cdc15b43926d1bd 100644 (file)
@@ -656,7 +656,6 @@ void BufferView::Pimpl::update()
        if (bv_->getLyXText()) {
                // check needed to survive LyX startup
                bv_->getLyXText()->redoCursor();
-               fitCursor();
        }
        screen().redraw(*bv_);
 }
@@ -795,10 +794,7 @@ void BufferView::Pimpl::center()
 
        beforeChange(text);
        int const half_height = workarea().workHeight() / 2;
-       int new_y = 0;
-
-       if (text->cursor.y() > half_height)
-               new_y = text->cursor.y() - half_height;
+       int new_y = std::max(0, text->cursor.y() - half_height);
 
        // FIXME: look at this comment again ...
 
index b987bf865133abd3f4408fafe14e7ffd3e953630..5169428f6e5bcb0021d2d4cee36a0d33b9f76409 100644 (file)
@@ -1,3 +1,7 @@
+2003-09-02  Alfredo Braunstein  <abraunst@libero.it>
+
+       * BufferView_pimpl.C (update): remove bogus fitCursor() call
+
 2003-09-02  Lars Gullik Bjønnes  <larsbj@gullik.net>
 
        * buffer.C (readFile): new function, take a filename and a