]> git.lyx.org Git - lyx.git/blobdiff - src/insets/InsetLabel.cpp
Remove dead code + whitespace
[lyx.git] / src / insets / InsetLabel.cpp
index a6498bc611b270e724a019d48a79e9b1f2200ca8..d78e2b4c7de09811a7d3883178e75e0adc52a688 100644 (file)
@@ -204,6 +204,13 @@ bool InsetLabel::getStatus(Cursor & cur, FuncRequest const & cmd,
        case LFUN_LABEL_COPY_AS_REFERENCE:
                enabled = true;
                break;
+       case LFUN_INSET_MODIFY:
+               if (cmd.getArg(0) == "changetype") {
+                       // this is handled by InsetCommand,
+                       // but not by InsetLabel.
+                       enabled = false;
+                       break;
+               }
        default:
                return InsetCommand::getStatus(cur, cmd, status);
        }
@@ -218,6 +225,12 @@ void InsetLabel::doDispatch(Cursor & cur, FuncRequest & cmd)
        switch (cmd.action()) {
 
        case LFUN_INSET_MODIFY: {
+               // the only other option here is "changetype", and we
+               // do not have different types.
+               if (cmd.getArg(0) != "label") {
+                       cur.undispatched();
+                       return;
+               }
                InsetCommandParams p(LABEL_CODE);
                // FIXME UNICODE
                InsetCommand::string2params(to_utf8(cmd.argument()), p);