From cd49b3d5e23311e60e7c6858014117e8d3de3edd Mon Sep 17 00:00:00 2001 From: Richard Heck Date: Tue, 10 May 2011 00:16:45 +0000 Subject: [PATCH] Fix for bug #7319. This is an attempt to fix the bug cheaply. We clear the refernce cache so that we won't get conflicts with labels that get pasted into the buffer. We should update this before its being empty matters. If not (i.e., if we encounter bugs), then this should instead be: cur.buffer().updateBuffer(); But we'll try the cheaper solution in trunk. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_2_0_X@38684 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/Text.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/Text.cpp b/src/Text.cpp index c231bcea8e..fad29a7459 100644 --- a/src/Text.cpp +++ b/src/Text.cpp @@ -1641,7 +1641,17 @@ bool Text::dissolveInset(Cursor & cur) spit += cur.pit(); Buffer & b = *cur.buffer(); cur.paragraph().eraseChar(cur.pos(), b.params().trackChanges); + if (!plist.empty()) { + // see bug 7319 + // we clear the cache so that we won't get conflicts with labels + // that get pasted into the buffer. we should update this before + // its being empty matters. if not (i.e., if we encounter bugs), + // then this should instead be: + // cur.buffer().updateBuffer(); + // but we'll try the cheaper solution here. + cur.buffer()->clearReferenceCache(); + // ERT paragraphs have the Language latex_language. // This is invalid outside of ERT, so we need to // change it to the buffer language. -- 2.39.5