]> git.lyx.org Git - lyx.git/blobdiff - src/insets/insetinclude.C
The markDirty() and fitCursor() changes
[lyx.git] / src / insets / insetinclude.C
index 2057a751f99824767ee323411094e61a79e511a3..ab4d2dc727a31fa045ade32f578ebf5598a7a84c 100644 (file)
@@ -127,14 +127,14 @@ dispatch_result InsetInclude::localDispatch(FuncRequest const & cmd)
                set(p);
                params_.masterFilename_ = cmd.view()->buffer()->fileName();
 
-               cmd.view()->updateInset(this, true);
+               cmd.view()->updateInset(this);
                result = DISPATCHED;
        }
        break;
 
        case LFUN_INSET_DIALOG_UPDATE: {
                InsetIncludeMailer mailer(*this);
-               mailer.updateDialog();
+               mailer.updateDialog(cmd.view());
        }
        break;
 
@@ -212,10 +212,10 @@ Inset * InsetInclude::clone(Buffer const & buffer, bool) const
 }
 
 
-void InsetInclude::edit(BufferView *, int, int, mouse_button::state)
+void InsetInclude::edit(BufferView * bv, int, int, mouse_button::state)
 {
        InsetIncludeMailer mailer(*this);
-       mailer.showDialog();
+       mailer.showDialog(bv);
 }
 
 
@@ -557,11 +557,11 @@ int InsetInclude::width(BufferView * bv, LyXFont const & font) const
 
 
 void InsetInclude::draw(BufferView * bv, LyXFont const & font, int y,
-                       float & xx, bool b) const
+                       float & xx) const
 {
        cache(bv);
        if (!preview_->previewReady()) {
-               InsetButton::draw(bv, font, y, xx, b);
+               InsetButton::draw(bv, font, y, xx);
                return;
        }
 
@@ -624,7 +624,7 @@ void InsetInclude::PreviewImpl::restartLoading()
        lyxerr << "restartLoading()" << std::endl;
        removePreview();
        if (view())
-               view()->updateInset(&parent(), false);
+               view()->updateInset(&parent());
        generatePreview();
 }
 
@@ -667,9 +667,11 @@ void InsetIncludeMailer::string2params(string const & in,
                        return;
        }
 
-       InsetInclude inset(params);     
-       inset.read(0, lex);
-       params = inset.params();
+       if (lex.isOK()) {
+               InsetInclude inset(params);     
+               inset.read(0, lex);
+               params = inset.params();
+       }
 }