]> git.lyx.org Git - features.git/commitdiff
Add some comments WRT to painting strategy.
authorAbdelrazak Younes <younes@lyx.org>
Tue, 21 Nov 2006 09:04:54 +0000 (09:04 +0000)
committerAbdelrazak Younes <younes@lyx.org>
Tue, 21 Nov 2006 09:04:54 +0000 (09:04 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16003 a592a061-630c-0410-9148-cb99ea01b6c8

src/lyxfunc.C

index 1975bce2e9476fa867ca8669cf8e21aeb46b75a0..582806ea8bac5b943f73a3fd39018c70c3ad1dcc 100644 (file)
@@ -1712,12 +1712,17 @@ void LyXFunc::dispatch(FuncRequest const & cmd)
                }
 
                if (lyx_view_ && view()->buffer()) {
-                       // Redraw screen unless explicitly told otherwise.
-                       // This also initializes the position cache for all insets
-                       // in (at least partially) visible top-level paragraphs.
-                       std::pair<bool, bool> needSecondUpdate = view()->update(updateFlags);
+                       // BufferView::update() updates the ViewMetricsInfo and
+                       // also initializes the position cache for all insets in
+                       // (at least partially) visible top-level paragraphs.
+                       std::pair<bool, bool> needSecondUpdate 
+                               = view()->update(updateFlags);
 
+                       // Redraw screen unless explicitly told otherwise.
                        if (needSecondUpdate.first)
+                               // Buffer::changed() signals that a repaint is needed.
+                               // The frontend (WorkArea) knows which area to repaint
+                               // thanks to the ViewMetricsInfo updated above.
                                view()->buffer()->changed();
 
                        lyx_view_->updateStatusBar();