From: Abdelrazak Younes Date: Sun, 2 Mar 2008 18:49:49 +0000 (+0000) Subject: rev 23399: the fix was not fully correct because labels are not editable. X-Git-Tag: 1.6.10~5939 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=7cd95251976072f407e1e5a9e48d733f2f5f912d;p=lyx.git rev 23399: the fix was not fully correct because labels are not editable. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23400 a592a061-630c-0410-9148-cb99ea01b6c8 --- diff --git a/src/Cursor.cpp b/src/Cursor.cpp index 05dfc5b9d3..33a6ca0f06 100644 --- a/src/Cursor.cpp +++ b/src/Cursor.cpp @@ -986,6 +986,8 @@ void Cursor::plainInsert(MathAtom const & t) { cell().insert(pos(), t); ++pos(); + inset().setBuffer(bv_->buffer()); + inset().validate(); } @@ -1024,10 +1026,11 @@ void Cursor::insert(Inset * inset0) BOOST_ASSERT(inset0); if (inMathed()) insert(MathAtom(inset0)); - else + else { text()->insertInset(*this, inset0); - inset().setBuffer(bv_->buffer()); - inset().validate(); + inset0->setBuffer(bv_->buffer()); + inset0->validate(); + } } diff --git a/src/Text3.cpp b/src/Text3.cpp index f6be355a41..c72e470333 100644 --- a/src/Text3.cpp +++ b/src/Text3.cpp @@ -854,7 +854,7 @@ void Text::dispatch(Cursor & cur, FuncRequest & cmd) */ if (cur.selection()) cutSelection(cur, true, false); - insertInset(cur, inset); + cur.insert(inset); cur.posForward(); } break;