From: Alfredo Braunstein Date: Tue, 2 Sep 2003 11:10:19 +0000 (+0000) Subject: avoid screen jumps when images get loaded X-Git-Tag: 1.6.10~16202 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=b02a5bf656de13f71432faabb9890325350254d7;p=features.git avoid screen jumps when images get loaded git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@7634 a592a061-630c-0410-9148-cb99ea01b6c8 --- diff --git a/src/BufferView_pimpl.C b/src/BufferView_pimpl.C index e7c10f33fd..296b9d61d1 100644 --- a/src/BufferView_pimpl.C +++ b/src/BufferView_pimpl.C @@ -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 ... diff --git a/src/ChangeLog b/src/ChangeLog index b987bf8651..5169428f6e 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,7 @@ +2003-09-02 Alfredo Braunstein + + * BufferView_pimpl.C (update): remove bogus fitCursor() call + 2003-09-02 Lars Gullik Bjønnes * buffer.C (readFile): new function, take a filename and a