if (cmd.getArg(0) == "ref") {
MathData ar;
if (createInsetMath_fromDialogStr(cmd.argument(), ar)) {
+ cur.recordUndo();
*this = *ar[0].nucleus()->asRefInset();
break;
}
break;
case LFUN_INSET_DIALOG_UPDATE: {
- string const data = createDialogStr("ref");
+ string const data = createDialogStr();
cur.bv().updateDialog("ref", data);
break;
}
}
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;
}
return;
}
// register this inset into the buffer reference cache.
- buffer().references(getTarget()).push_back(make_pair(this, it));
+ buffer().addReference(getTarget(), this, it);
}
-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));