]> git.lyx.org Git - lyx.git/blobdiff - src/graphics/PreviewedInset.C
Purely mechanical: move fragile into LatexRunParams.
[lyx.git] / src / graphics / PreviewedInset.C
index fca6369910d0631d1a3e729c095aadba3d1cd177..468d1f65ce0249efbde5901931c2873a2f8cbea8 100644 (file)
@@ -36,6 +36,12 @@ bool PreviewedInset::activated()
 }
 
 
+BufferView * PreviewedInset::view() const
+{
+       return inset_.view();
+}
+
+
 void PreviewedInset::generatePreview()
 {
        if (!Previews::activated() || !previewWanted() ||
@@ -55,8 +61,6 @@ void PreviewedInset::addPreview(grfx::PreviewLoader & ploader)
        if (!Previews::activated() || !previewWanted())
                return;
 
-       setView(ploader.buffer().getUser());
-
        snippet_ = trim(latexString());
        if (snippet_.empty())
                return;
@@ -109,14 +113,6 @@ bool PreviewedInset::previewReady() const
 }
 
 
-void PreviewedInset::setView(BufferView * bv)
-{
-       if (!bv)
-               return;
-
-       view_ = bv->owner()->view();
-}
-
 void PreviewedInset::imageReady(grfx::PreviewImage const & pimage) const
 {
        // Check snippet against the Inset's current contents
@@ -126,7 +122,7 @@ void PreviewedInset::imageReady(grfx::PreviewImage const & pimage) const
        pimage_ = &pimage;
 
        if (view())
-               view()->updateInset(&inset_, false);
+               view()->updateInset(&inset_);
 }
 
 } // namespace grfx