Add some comments WRT to painting strategy.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16003 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Abdelrazak Younes 2006-11-21 09:04:54 +00:00
parent 7c1b006288
commit e17cb17ef9

View File

@ -1712,12 +1712,17 @@ void LyXFunc::dispatch(FuncRequest const & cmd)
} }
if (lyx_view_ && view()->buffer()) { if (lyx_view_ && view()->buffer()) {
// Redraw screen unless explicitly told otherwise. // BufferView::update() updates the ViewMetricsInfo and
// This also initializes the position cache for all insets // also initializes the position cache for all insets in
// in (at least partially) visible top-level paragraphs. // (at least partially) visible top-level paragraphs.
std::pair<bool, bool> needSecondUpdate = view()->update(updateFlags); std::pair<bool, bool> needSecondUpdate
= view()->update(updateFlags);
// Redraw screen unless explicitly told otherwise.
if (needSecondUpdate.first) 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(); view()->buffer()->changed();
lyx_view_->updateStatusBar(); lyx_view_->updateStatusBar();