X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Fmathed%2FInsetMathRef.cpp;h=ae1768351c426d20af4ab680e98282ad9c864222;hb=55a3dd7b346d29a52ba305a4558e9e380ef50f47;hp=14d3a35e2942a7b717a9af465d5f0df4a5fa2e1e;hpb=c5b9664476770aad788572fd4a16ec89ca4382ab;p=lyx.git diff --git a/src/mathed/InsetMathRef.cpp b/src/mathed/InsetMathRef.cpp index 14d3a35e29..ae1768351c 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; } @@ -74,7 +75,7 @@ void InsetMathRef::doDispatch(Cursor & cur, FuncRequest & cmd) break; case LFUN_INSET_DIALOG_UPDATE: { - string const data = createDialogStr("ref"); + string const data = createDialogStr(); cur.bv().updateDialog("ref", data); break; } @@ -88,7 +89,7 @@ void InsetMathRef::doDispatch(Cursor & cur, FuncRequest & cmd) } if (cmd.button() == mouse_button::button1) { // Eventually trigger dialog with button 3, not 1 - string const data = createDialogStr("ref"); + string const data = createDialogStr(); cur.bv().showDialog("ref", data, this); break; } @@ -187,7 +188,7 @@ void InsetMathRef::updateBuffer(ParIterator const & it, UpdateType /*utype*/) } -string const InsetMathRef::createDialogStr(string const & /*name*/) const +string const InsetMathRef::createDialogStr() const { InsetCommandParams icp(REF_CODE, to_ascii(commandname())); icp["reference"] = asString(cell(0));