commit b272e4bfb0a42e5fbeac5f5fddb4f545be5e0c57
Author: Juergen Spitzmueller <sp...@lyx.org>
Date:   Fri Mar 12 17:42:56 2021 +0100

    Fix ct in table cell pasting
---
 src/insets/InsetTabular.cpp |   13 ++++++++-----
 1 files changed, 8 insertions(+), 5 deletions(-)

diff --git a/src/insets/InsetTabular.cpp b/src/insets/InsetTabular.cpp
index cea677b..647f6d6 100644
--- a/src/insets/InsetTabular.cpp
+++ b/src/insets/InsetTabular.cpp
@@ -7311,12 +7311,15 @@ bool InsetTabular::pasteClipboard(Cursor & cur)
                        // FIXME?: why do we need to do this explicitly? (EL)
                        tabular.cellInset(r2, c2)->setBuffer(tabular.buffer());
 
-                       if (!lyxrc.ct_markup_copied) {
-                               // do not paste deleted text
-                               inset->acceptChanges();
+                       if (lyxrc.ct_markup_copied) {
+                               // Only change to inserted if ct is active,
+                               // otherwise leave markup as is
+                               if (buffer().params().track_changes)
+                                       
inset->setChange(Change(Change::INSERTED));
+                       } else
+                               // Resolve all markup to inserted or unchanged
                                
inset->setChange(Change(buffer().params().track_changes ?
-                                               Change::INSERTED : 
Change::UNCHANGED));
-                       }
+                                                        Change::INSERTED : 
Change::UNCHANGED));
                        cur.pos() = 0;
                        cur.pit() = 0;
                }
-- 
lyx-cvs mailing list
lyx-cvs@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-cvs

Reply via email to