Fix crash when closing the last buffer and add a FIXME.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15998 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Abdelrazak Younes 2006-11-20 16:43:36 +00:00
parent 34600f5055
commit 37ee9727f7

View File

@ -197,6 +197,10 @@ void BufferView::setBuffer(Buffer * b)
}
}
// FIXME: in principle, a simple call to updateMetrics(false) should
// be enough here. But, for unknown reason, it seems that only the line
// of the cursor is updated in the CoordCache.
if (buffer_)
updateMetrics(false);
if (buffer_ && graphics::Previews::status() != LyXRC::PREVIEW_OFF)