From: Abdelrazak Younes Date: Mon, 5 Nov 2007 12:04:47 +0000 (+0000) Subject: Fix bug 4317 and update comment WRT current situation of trunk. X-Git-Tag: 1.6.10~7480 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=c1afc30a8ae5eed078c365473707b5743f27f985;p=features.git Fix bug 4317 and update comment WRT current situation of trunk. http://bugzilla.lyx.org/show_bug.cgi?id=4317 git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21435 a592a061-630c-0410-9148-cb99ea01b6c8 --- diff --git a/src/Text3.cpp b/src/Text3.cpp index a4dff99a90..887e9bd050 100644 --- a/src/Text3.cpp +++ b/src/Text3.cpp @@ -1083,14 +1083,14 @@ void Text::dispatch(Cursor & cur, FuncRequest & cmd) // true (on). if (lyxrc.auto_region_delete && cur.selection()) { + pit_type const begpit = cur.selBegin().pit(); + pit_type const endpit = cur.selEnd().pit(); cutSelection(cur, false, false); - // When change tracking is set to off, the metrics update - // mechanism correctly detects if a full update is needed or not. - // This detection fails when a selection spans multiple rows and - // change tracking is enabled because the paragraph metrics stays - // the same. In this case, we force the full update: - // (see http://bugzilla.lyx.org/show_bug.cgi?id=3992) - if (cur.buffer().params().trackChanges) + // When a selection spans multiple paragraphs, the metrics update + // mechanism sometimes fail to detect that a full update is needed. + // In this case, we force the full update: + // (see http://bugzilla.lyx.org/show_bug.cgi?id=4317) + if (isMainText(cur.bv().buffer()) && begpit != endpit) cur.updateFlags(Update::Force); }