From: Richard Heck Date: Sun, 15 Apr 2012 12:59:46 +0000 (-0400) Subject: Before we process the LFUN, make sure that it is actually intended X-Git-Tag: 2.1.0beta1~1913 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=3380e0de8fc8dc1487d26c9aeb041538d1df8576;p=features.git Before we process the LFUN, make sure that it is actually intended for us. --- diff --git a/src/insets/InsetBox.cpp b/src/insets/InsetBox.cpp index a396157caa..68bca75947 100644 --- a/src/insets/InsetBox.cpp +++ b/src/insets/InsetBox.cpp @@ -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;