]> git.lyx.org Git - features.git/commitdiff
Fix bug 4317 and update comment WRT current situation of trunk.
authorAbdelrazak Younes <younes@lyx.org>
Mon, 5 Nov 2007 12:04:47 +0000 (12:04 +0000)
committerAbdelrazak Younes <younes@lyx.org>
Mon, 5 Nov 2007 12:04:47 +0000 (12:04 +0000)
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

index a4dff99a9050cda1cd7f986079de89c3e21550e5..887e9bd05068610bcc3f107efed245aa99368925 100644 (file)
@@ -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);
                }