mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-08 10:51:03 +00:00
change tracking:
* src/paragraph_pimpl.C: only reject an inset's content if the inset itself is UNCHANGED git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15572 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
62b09e3dbd
commit
c1dbcb6f06
@ -187,6 +187,10 @@ void Paragraph::Pimpl::rejectChanges(pos_type start, pos_type end)
|
|||||||
for (pos_type pos = start; pos < end; ++pos) {
|
for (pos_type pos = start; pos < end; ++pos) {
|
||||||
switch (lookupChange(pos).type) {
|
switch (lookupChange(pos).type) {
|
||||||
case Change::UNCHANGED:
|
case Change::UNCHANGED:
|
||||||
|
// also reject changes inside of insets
|
||||||
|
if (pos < size() && owner_->isInset(pos)) {
|
||||||
|
owner_->getInset(pos)->rejectChanges();
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case Change::INSERTED:
|
case Change::INSERTED:
|
||||||
@ -201,12 +205,11 @@ void Paragraph::Pimpl::rejectChanges(pos_type start, pos_type end)
|
|||||||
|
|
||||||
case Change::DELETED:
|
case Change::DELETED:
|
||||||
changes_.set(Change(Change::UNCHANGED), pos);
|
changes_.set(Change(Change::UNCHANGED), pos);
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
// also reject changes in nested insets
|
// Do NOT reject changes within a deleted inset!
|
||||||
if (pos < size() && owner_->isInset(pos)) {
|
// There may be insertions of a co-author inside of it!
|
||||||
owner_->getInset(pos)->rejectChanges();
|
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user