]> git.lyx.org Git - lyx.git/blobdiff - src/insets/graphicinset.C
Enable the external inset to handle unknown templates gracefully.
[lyx.git] / src / insets / graphicinset.C
index a4e5a93c64f24acc9f0573ba60fea05f4ab5243e..7d80bfeec4395d68b45f9d85aa48cb5977b7c3ae 100644 (file)
@@ -50,12 +50,6 @@ void GraphicInset::update(grfx::Params const & params)
 }
 
 
-grfx::Params const & GraphicInset::params() const
-{
-       return params_;
-}
-
-
 bool GraphicInset::hasFileChanged() const
 {
        unsigned long const new_checksum = loader_.checksum();
@@ -66,13 +60,6 @@ bool GraphicInset::hasFileChanged() const
 }
 
 
-void GraphicInset::view(BufferView * bv) const
-{
-       if (bv)
-               view_ = bv->owner()->view();
-}
-
-
 BufferView * GraphicInset::view() const
 {
        return view_.lock().get();
@@ -190,8 +177,8 @@ void GraphicInset::metrics(MetricsInfo & mi, Dimension & dim) const
 
 void GraphicInset::draw(PainterInfo & pi, int x, int y) const
 {
-       // Cache the BufferView.
-       view(pi.base.bv);
+       if (pi.base.bv)
+               view_ = pi.base.bv->owner()->view();
 
 #if 0
        // Comment this out and see if anything goes wrong.