]> git.lyx.org Git - features.git/commitdiff
* BufferView::update(): fitCursor() optimization.
authorAbdelrazak Younes <younes@lyx.org>
Fri, 28 Sep 2007 07:32:19 +0000 (07:32 +0000)
committerAbdelrazak Younes <younes@lyx.org>
Fri, 28 Sep 2007 07:32:19 +0000 (07:32 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20560 a592a061-630c-0410-9148-cb99ea01b6c8

src/BufferView.cpp

index 345f05740fcb19b94385354554ec90be0d483f13..21a3c9f67afb1cbdc4d03afe82919c1fd8656977 100644 (file)
@@ -257,6 +257,11 @@ bool BufferView::update(Update::flags flags)
                buffer_.changed();
                if (fitCursor())
                        updateMetrics(false);
+               else
+                       // The screen has already been updated thanks to the
+                       // 'buffer_.changed()' call three line above. So no need
+                       // to redraw again.
+                       return false;
        }
 
        // tell the frontend to update the screen.