Fix screen update when deleting insets:

http://bugzilla.lyx.org/show_bug.cgi?id=3071


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16531 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Abdelrazak Younes 2007-01-05 14:31:59 +00:00
parent 3c323c1a37
commit 7d4edd3f79

View File

@ -1342,6 +1342,14 @@ void BufferView::updateMetrics(bool singlepar)
offset_ref_ = 0;
}
// In singlepar mode, the anchor has to be reset because
// there is no metrics update with keyboard mouvement or
// mouse clicking if this didn't resulted in scrolling.
// FIXME: We should splitup updateMetrics() for the singlepar
// case.
if (singlepar)
anchor_ref_ = cursor_.bottom().pit();
pit_type const pit = anchor_ref_;
int pit1 = pit;
int pit2 = pit;
@ -1352,6 +1360,8 @@ void BufferView::updateMetrics(bool singlepar)
// (if this paragraph contains insets etc., rebreaking will
// recursively descend)
if (!singlepar || pit == cursor_.bottom().pit())
// If the paragraph metrics has changed, we can not
// use the singlepar optimisation.
if (tm.redoParagraph(pit))
singlepar = false;