mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-22 13:18:28 +00:00
Before we process the LFUN, make sure that it is actually intended
for us.
This commit is contained in:
parent
f84eb64ac7
commit
3380e0de8f
@ -190,10 +190,19 @@ void InsetBox::doDispatch(Cursor & cur, FuncRequest & cmd)
|
||||
|
||||
case LFUN_INSET_MODIFY: {
|
||||
//lyxerr << "InsetBox::dispatch MODIFY" << endl;
|
||||
string const first_arg = cmd.getArg(0);
|
||||
bool const change_type = first_arg == "changetype";
|
||||
bool const for_box = first_arg == "box";
|
||||
if (!change_type && !for_box) {
|
||||
// not for us
|
||||
// this will not be handled higher up
|
||||
cur.undispatched();
|
||||
return;
|
||||
}
|
||||
cur.recordUndoInset(ATOMIC_UNDO, this);
|
||||
if (cmd.getArg(0) == "changetype") {
|
||||
if (change_type)
|
||||
params_.type = cmd.getArg(1);
|
||||
} else
|
||||
else // if (for_box)
|
||||
string2params(to_utf8(cmd.argument()), params_);
|
||||
setButtonLabel();
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user