Correctly show deleted url with change tracking

This fixes the issue reported here:
https://www.mail-archive.com/lyx-devel@lists.lyx.org/msg202545.html

I could not find an open ticket about it.
This commit is contained in:
Enrico Forestieri 2021-02-17 19:51:01 +01:00
parent 894977b62e
commit 2fdee24959
2 changed files with 8 additions and 3 deletions

View File

@ -2515,7 +2515,9 @@ void Paragraph::latex(BufferParams const & bparams,
// Do we have an open font change?
bool open_font = false;
Change runningChange = Change(Change::UNCHANGED);
Change runningChange =
runparams.inDeletedInset && !inInset().canTrackChanges()
? runparams.changeOfDeletedInset : Change(Change::UNCHANGED);
Encoding const * const prev_encoding = runparams.encoding;
@ -3050,6 +3052,7 @@ void Paragraph::latex(BufferParams const & bparams,
os << "{\\" << font.latexSize() << "\\par}";
}
if (!runparams.inDeletedInset || inInset().canTrackChanges())
column += Changes::latexMarkChange(os, bparams, runningChange,
Change(Change::UNCHANGED), runparams);

View File

@ -40,6 +40,8 @@ public:
///
bool hasSettings() const override { return false; }
///
bool canTrackChanges() const override { return name_ != "URL"; }
///
bool getStatus(Cursor & cur, FuncRequest const & cmd,
FuncStatus &) const override;
///