]> git.lyx.org Git - features.git/commitdiff
rev 23399: the fix was not fully correct because labels are not editable.
authorAbdelrazak Younes <younes@lyx.org>
Sun, 2 Mar 2008 18:49:49 +0000 (18:49 +0000)
committerAbdelrazak Younes <younes@lyx.org>
Sun, 2 Mar 2008 18:49:49 +0000 (18:49 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23400 a592a061-630c-0410-9148-cb99ea01b6c8

src/Cursor.cpp
src/Text3.cpp

index 05dfc5b9d3c45d22a2612d2e9cd0197c66459574..33a6ca0f068c1b0eb2a84119221d8039ef86db6b 100644 (file)
@@ -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();
+       }
 }
 
 
index f6be355a4191c39158d15786be7432758ad8b959..c72e470333e8fb5ea849307af223a313bd3cb6dd 100644 (file)
@@ -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;