[LyX/master] Properly resolve tracked changes when pasting multiple tabular cells

Juergen Spitzmueller spitz at lyx.org
Sat Mar 21 14:35:18 UTC 2020


commit 1e409a1a754110b420b19f0325f6cc7f5d1ba10a
Author: Juergen Spitzmueller <spitz at lyx.org>
Date:   Sat Mar 21 15:54:37 2020 +0100

    Properly resolve tracked changes when pasting multiple tabular cells
    
    Fixes #11791
---
 src/insets/InsetTabular.cpp |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/src/insets/InsetTabular.cpp b/src/insets/InsetTabular.cpp
index e1ee36d..dc8be28 100644
--- a/src/insets/InsetTabular.cpp
+++ b/src/insets/InsetTabular.cpp
@@ -7131,9 +7131,12 @@ bool InsetTabular::pasteClipboard(Cursor & cur)
 			// FIXME?: why do we need to do this explicitly? (EL)
 			tabular.cellInset(r2, c2)->setBuffer(tabular.buffer());
 
-			// FIXME: change tracking (MG)
-			inset->setChange(Change(buffer().params().track_changes ?
+			if (!lyxrc.ct_markup_copied) {
+				// do not paste deleted text
+				inset->acceptChanges();
+				inset->setChange(Change(buffer().params().track_changes ?
 						Change::INSERTED : Change::UNCHANGED));
+			}
 			cur.pos() = 0;
 			cur.pit() = 0;
 		}


More information about the lyx-cvs mailing list