mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-27 22:41:09 +00:00
change tracking:
src/text2.C: invoke insertInset with correct Change parameter; only check for change _type_ (DELETED) for DEPM purposes git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15406 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
b6af1ce3e1
commit
789cfa90ab
10
src/text2.C
10
src/text2.C
@ -648,8 +648,9 @@ void LyXText::insertInset(LCursor & cur, InsetBase * inset)
|
|||||||
{
|
{
|
||||||
BOOST_ASSERT(this == cur.text());
|
BOOST_ASSERT(this == cur.text());
|
||||||
BOOST_ASSERT(inset);
|
BOOST_ASSERT(inset);
|
||||||
// FIXME: change tracking (MG)
|
cur.paragraph().insertInset(cur.pos(), inset,
|
||||||
cur.paragraph().insertInset(cur.pos(), inset, Change(Change::INSERTED));
|
Change(cur.buffer().params().trackChanges ?
|
||||||
|
Change::INSERTED : Change::UNCHANGED));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -1262,9 +1263,8 @@ bool LyXText::deleteEmptyParagraphMechanism(LCursor & cur, LCursor & old)
|
|||||||
&& old.pos() < oldpar.size()
|
&& old.pos() < oldpar.size()
|
||||||
&& oldpar.isLineSeparator(old.pos())
|
&& oldpar.isLineSeparator(old.pos())
|
||||||
&& oldpar.isLineSeparator(old.pos() - 1)
|
&& oldpar.isLineSeparator(old.pos() - 1)
|
||||||
// FIXME: change tracking (MG)
|
&& oldpar.lookupChange(old.pos() - 1).type != Change::DELETED) {
|
||||||
&& oldpar.lookupChange(old.pos() - 1) != Change(Change::DELETED)) {
|
oldpar.erase(old.pos() - 1, false); // do not track changes in DEPM
|
||||||
oldpar.erase(old.pos() - 1, false); // do not track changes in DEPM
|
|
||||||
#ifdef WITH_WARNINGS
|
#ifdef WITH_WARNINGS
|
||||||
#warning This will not work anymore when we have multiple views of the same buffer
|
#warning This will not work anymore when we have multiple views of the same buffer
|
||||||
// In this case, we will have to correct also the cursors held by
|
// In this case, we will have to correct also the cursors held by
|
||||||
|
Loading…
Reference in New Issue
Block a user