]> git.lyx.org Git - lyx.git/blobdiff - src/insets/insetcommand.C
The markDirty() and fitCursor() changes
[lyx.git] / src / insets / insetcommand.C
index 2759492a4471eba77af587994796b8c6302dff0e..dd2ae21cc49b19dd84af1a06c965dd2e71d2cea8 100644 (file)
@@ -77,14 +77,14 @@ dispatch_result InsetCommand::localDispatch(FuncRequest const & cmd)
                        break;
 
                setParams(p);
-               cmd.view()->updateInset(this, true);
+               cmd.view()->updateInset(this);
                result = DISPATCHED;
        }
        break;
 
        case LFUN_INSET_DIALOG_UPDATE: {
                InsetCommandMailer mailer(cmd.argument, *this);
-               mailer.updateDialog();
+               mailer.updateDialog(cmd.view());
        }
        break;
 
@@ -99,6 +99,7 @@ dispatch_result InsetCommand::localDispatch(FuncRequest const & cmd)
        return result;
 }
 
+
 InsetCommandMailer::InsetCommandMailer(string const & name,
                                       InsetCommand & inset)
        : name_(name), inset_(inset)
@@ -127,7 +128,17 @@ void InsetCommandMailer::string2params(string const & in,
                string const name = lex.getString();
        }
 
-       params.read(lex);
+       // This is part of the inset proper that is usually swallowed
+       // by Buffer::readInset
+       if (lex.isOK()) {
+               lex.next();
+               string const token = lex.getString();
+               if (token != "LatexCommand")
+                       return;
+       }
+       if (lex.isOK()) {
+               params.read(lex);
+       }
 }