]> git.lyx.org Git - features.git/blobdiff - src/insets/InsetBox.cpp
Another witch hunting case: break-paragraph -> paragraph-break.
[features.git] / src / insets / InsetBox.cpp
index a396157caad575d7f8ca957d6a4f4ef8b637c263..2e611ffd30d14e818c78b09952a59a8bc7155d6b 100644 (file)
@@ -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;
@@ -230,7 +239,7 @@ bool InsetBox::getStatus(Cursor & cur, FuncRequest const & cmd,
                flag.setEnabled(true);
                return true;
 
-       case LFUN_BREAK_PARAGRAPH:
+       case LFUN_PARAGRAPH_BREAK:
                if ((params_.inner_box && !params_.use_makebox)
                     || params_.type == "Shaded" || params_.type == "Framed")
                        return InsetCollapsable::getStatus(cur, cmd, flag);