]> git.lyx.org Git - features.git/commitdiff
Always mark pasted stuff as changed with ct on
authorJuergen Spitzmueller <spitz@lyx.org>
Sun, 6 Dec 2020 09:00:47 +0000 (10:00 +0100)
committerJuergen Spitzmueller <spitz@lyx.org>
Sun, 6 Dec 2020 09:00:47 +0000 (10:00 +0100)
independent of "Keep change tracking markup on copy and paste" pref.

Probably addresses #11973

src/CutAndPaste.cpp

index b6aec8f5a54f990b5f0da697d00946901364106c..fc555c1375bf157f91ea57d7a39544fa1feaf50f 100644 (file)
@@ -277,7 +277,13 @@ pasteSelectionHelper(DocIterator const & cur, ParagraphList const & parlist,
                                        tmpbuf->eraseChar(i--, false);
                }
 
-               if (lyxrc.ct_markup_copied)
+               if (lyxrc.ct_markup_copied) {
+                       // Only change to inserted if ct is active,
+                       // otherwise leave markup as is
+                       if (buffer.params().track_changes)
+                               tmpbuf->setChange(Change(Change::INSERTED));
+               } else
+                       // Resolve all markup to inserted or unchanged
                        tmpbuf->setChange(Change(buffer.params().track_changes ?
                                                 Change::INSERTED : Change::UNCHANGED));
        }