]> git.lyx.org Git - lyx.git/commitdiff
Fix 3992: Screen update problem in change tracking mode
authorAbdelrazak Younes <younes@lyx.org>
Mon, 9 Jul 2007 10:32:28 +0000 (10:32 +0000)
committerAbdelrazak Younes <younes@lyx.org>
Mon, 9 Jul 2007 10:32:28 +0000 (10:32 +0000)
http://bugzilla.lyx.org/show_bug.cgi?id=3992

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19010 a592a061-630c-0410-9148-cb99ea01b6c8

src/Text3.cpp

index becf740862836fe0782c680fb25812212c9c49a2..ee6cf0af0020b11b662ef6f426b13098c1b30d1d 100644 (file)
@@ -1141,9 +1141,17 @@ void Text::dispatch(Cursor & cur, FuncRequest & cmd)
                // "auto_region_delete", which defaults to
                // true (on).
 
-               if (lyxrc.auto_region_delete)
-                       if (cur.selection())
-                               cutSelection(cur, false, false);
+               if (lyxrc.auto_region_delete && cur.selection()) {
+                       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)
+                               cur.updateFlags(Update::Force);
+               }
 
                cur.clearSelection();
                Font const old_font = real_current_font;