José Matos wrote:
On Monday 09 July 2007 09:56:18 Abdelrazak Younes wrote:
http://bugzilla.lyx.org/show_bug.cgi?id=3992

Attached.

OK.

I committed a better version with some comments:

Author: younes
Date: Mon Jul  9 12:32:28 2007
New Revision: 19010

URL: http://www.lyx.org/trac/changeset/19010
Log:
Fix 3992: Screen update problem in change tracking mode

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

Modified:
    lyx-devel/trunk/src/Text3.cpp

Modified: lyx-devel/trunk/src/Text3.cpp
URL: http://www.lyx.org/trac/file/lyx-devel/trunk/src/Text3.cpp?rev=19010
==============================================================================
--- lyx-devel/trunk/src/Text3.cpp (original)
+++ lyx-devel/trunk/src/Text3.cpp Mon Jul  9 12:32:28 2007
@@ -1141,9 +1141,17 @@
                // "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;


Reply via email to