From c1afc30a8ae5eed078c365473707b5743f27f985 Mon Sep 17 00:00:00 2001 From: Abdelrazak Younes Date: Mon, 5 Nov 2007 12:04:47 +0000 Subject: [PATCH] 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 --- src/Text3.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) 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); } -- 2.39.2