]> git.lyx.org Git - lyx.git/blobdiff - src/insets/InsetCommand.cpp
* src/insets/InsetSpace.cpp:
[lyx.git] / src / insets / InsetCommand.cpp
index 4b2830f625cc9c13943ba3380123d517bb733b4c..745cfeca8a1e0956ed43abbeeaf7d1c52a25bebc 100644 (file)
@@ -156,19 +156,19 @@ bool InsetCommand::getStatus(Cursor & cur, FuncRequest const & cmd,
        switch (cmd.action) {
        // suppress these
        case LFUN_ERT_INSERT:
-               status.enabled(false);
+               status.setEnabled(false);
                return true;
        // we handle these
        case LFUN_INSET_MODIFY:
                if (cmd.getArg(0) == "changetype") {
                        string const newtype = cmd.getArg(1);
-                       status.enabled(p_.isCompatibleCommand(p_.code(), newtype));
+                       status.setEnabled(p_.isCompatibleCommand(p_.code(), newtype));
                        status.setOnOff(newtype == p_.getCmdName());
-               } else
-                       status.enabled(true);
+               } 
+               status.setEnabled(true);
                return true;
        case LFUN_INSET_DIALOG_UPDATE:
-               status.enabled(true);
+               status.setEnabled(true);
                return true;
        default:
                return Inset::getStatus(cur, cmd, status);
@@ -194,6 +194,8 @@ bool InsetCommand::string2params(string const & name, string const & in,
        InsetCommandParams & params)
 {
        params.clear();
+       if (in.empty())
+               return false;
        istringstream data(in);
        Lexer lex;
        lex.setStream(data);