menus were (intentionally) missing, and it turns out they were needed.
Normally all invocations of INSET_MODIFY should trigger a recordUndo now.
Of course all cases have not been tested, but it should be working.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@36770
a592a061-630c-0410-9148-
cb99ea01b6c8
cur.noScreenUpdate();
break;
}
+
+ cur.recordUndo();
+
docstring const & old_key = params()["key"];
docstring const & old_label = params()["label"];
docstring label = p["label"];
throw message;
break;
}
- //
+
+ cur.recordUndo();
setParams(p);
buffer().invalidateBibfileCache();
cur.forceBufferUpdate();
case LFUN_INSET_MODIFY: {
//lyxerr << "InsetBox::dispatch MODIFY" << endl;
+ cur.recordUndoInset(ATOMIC_UNDO, this);
if (cmd.getArg(0) == "changetype") {
- cur.recordUndoInset(ATOMIC_UNDO, this);
params_.type = cmd.getArg(1);
} else
string2params(to_utf8(cmd.argument()), params_);
case LFUN_INSET_MODIFY: {
InsetBranchParams params;
InsetBranch::string2params(to_utf8(cmd.argument()), params);
+
+ cur.recordUndoInset(ATOMIC_UNDO, this);
params_.branch = params.branch;
// what we really want here is a TOC update, but that means
// a full buffer update
InsetCommand::string2params(to_utf8(cmd.argument()), p);
if (p.getCmdName().empty())
cur.noScreenUpdate();
- else
+ else {
+ cur.recordUndo();
setParams(p);
+ }
// FIXME We might also want to check here if this one is in the TOC.
// But I think most of those are labeled.
if (isLabeled())
switch (cmd.action()) {
case LFUN_INSET_MODIFY:
if (cmd.getArg(0) == "ert") {
+ cur.recordUndoInset(ATOMIC_UNDO, this);
setStatus(cur, string2params(to_utf8(cmd.argument())));
break;
}
case LFUN_INSET_MODIFY: {
InsetExternalParams p;
string2params(to_utf8(cmd.argument()), buffer(), p);
+ cur.recordUndo();
setParams(p);
break;
}
case LFUN_INSET_MODIFY: {
InsetFloatParams params;
string2params(to_utf8(cmd.argument()), params);
+ cur.recordUndoInset(ATOMIC_UNDO, this);
// placement, wide and sideways are not used for subfloats
if (!params_.subfloat) {
break;
}
+ cur.recordUndo();
setParams(p);
// if the inset is part of a graphics group, all the
// other members should be updated too.
}
}
}
+ cur.recordUndo();
setParams(p);
cur.forceBufferUpdate();
} else
}
InsetIndexParams params;
InsetIndex::string2params(to_utf8(cmd.argument()), params);
+ cur.recordUndoInset(ATOMIC_UNDO, this);
params_.index = params.index;
// what we really want here is a TOC update, but that means
// a full buffer update
cur.noScreenUpdate();
break;
}
- if (p["name"] != params()["name"])
+ if (p["name"] != params()["name"]) {
+ // undo is handled in updateCommand
updateCommand(p["name"]);
+ }
cur.forceBufferUpdate();
break;
}
cur.noScreenUpdate();
break;
}
+ cur.recordUndo();
setParams(p);
break;
}
switch (cmd.action()) {
case LFUN_INSET_MODIFY: {
+ cur.recordUndoInset(ATOMIC_UNDO, this);
InsetListings::string2params(to_utf8(cmd.argument()), params());
break;
}
cur.noScreenUpdate();
break;
}
+
+ cur.recordUndo();
setParams(p);
break;
}
break;
}
- cur.recordUndoInset(ATOMIC_UNDO);
+ cur.recordUndoInset(ATOMIC_UNDO, this);
getSelection(cur, sel_row_start, sel_row_end, sel_col_start, sel_col_end);
row_type const row = tabular.cellRow(cur.idx());
{
switch (cmd.action()) {
case LFUN_INSET_MODIFY: {
+ cur.recordUndoInset(ATOMIC_UNDO, this);
InsetWrapParams params;
InsetWrap::string2params(to_utf8(cmd.argument()), params);
params_.lines = params.lines;
if (cmd.getArg(0) == "ref") {
MathData ar;
if (createInsetMath_fromDialogStr(cmd.argument(), ar)) {
+ cur.recordUndo();
*this = *ar[0].nucleus()->asRefInset();
break;
}