From d4ba38a59ca6b4520978bb0579684c030c594a4c Mon Sep 17 00:00:00 2001 From: Michael Schmitt Date: Sat, 25 Nov 2006 23:30:58 +0000 Subject: [PATCH] * src/text.C: remove FIXME because inset-dissolve works! use const_iterator to access paragraph insetlist; add FIXME in accept/rejectChange git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16049 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/text.C | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/text.C b/src/text.C index 4e8d5c2fed..2cebea4251 100644 --- a/src/text.C +++ b/src/text.C @@ -1473,9 +1473,12 @@ bool LyXText::selectWordWhenUnderCursor(LCursor & cur, word_location loc) void LyXText::acceptChange(LCursor & cur) { BOOST_ASSERT(this == cur.text()); + if (!cur.selection() && cur.lastpos() != 0) return; + // FIXME: we must handle start = end = 0 + recordUndoSelection(cur, Undo::INSERT); DocIterator it = cur.selectionBegin(); @@ -1510,9 +1513,12 @@ void LyXText::acceptChange(LCursor & cur) void LyXText::rejectChange(LCursor & cur) { BOOST_ASSERT(this == cur.text()); + if (!cur.selection() && cur.lastpos() != 0) return; + // FIXME: we must handle start = end = 0 + recordUndoSelection(cur, Undo::INSERT); DocIterator it = cur.selectionBegin(); @@ -1812,7 +1818,6 @@ bool LyXText::dissolveInset(LCursor & cur) { spos += cur.pos(); spit += cur.pit(); Buffer & b = cur.buffer(); - // FIXME: change tracking (MG) cur.paragraph().eraseChar(cur.pos(), b.params().trackChanges); if (!plist.empty()) { if (in_ert) { @@ -1880,8 +1885,8 @@ bool LyXText::redoParagraph(BufferView & bv, pit_type const pit) // FIXME: We should always use getFont(), see documentation of // noFontChange() in insetbase.h. LyXFont const bufferfont = buffer.params().getFont(); - InsetList::iterator ii = par.insetlist.begin(); - InsetList::iterator iend = par.insetlist.end(); + InsetList::const_iterator ii = par.insetlist.begin(); + InsetList::const_iterator iend = par.insetlist.end(); for (; ii != iend; ++ii) { Dimension dim; int const w = maxwidth_ - leftMargin(buffer, pit, ii->pos) -- 2.39.5