X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2Fmathed%2FInsetMathRef.cpp;h=ef08cbcd3d0610d95c8b9446e85b5959261822fe;hb=cdc847fd304019a19425a0d5d9d42a556a937097;hp=4485304a9fc36fa48a7dad263cb35b9e8ddde545;hpb=aafe9850429075ec9945584f6b7cdf1892cc4f5c;p=lyx.git diff --git a/src/mathed/InsetMathRef.cpp b/src/mathed/InsetMathRef.cpp index 4485304a9f..ef08cbcd3d 100644 --- a/src/mathed/InsetMathRef.cpp +++ b/src/mathed/InsetMathRef.cpp @@ -66,6 +66,7 @@ void InsetMathRef::doDispatch(Cursor & cur, FuncRequest & cmd) if (cmd.getArg(0) == "ref") { MathData ar; if (createInsetMath_fromDialogStr(cmd.argument(), ar)) { + cur.recordUndo(); *this = *ar[0].nucleus()->asRefInset(); break; } @@ -183,7 +184,7 @@ void InsetMathRef::updateBuffer(ParIterator const & it, UpdateType /*utype*/) return; } // register this inset into the buffer reference cache. - buffer().references(getTarget()).push_back(make_pair(this, it)); + buffer().addReference(getTarget(), this, it); }