X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Fgraphics%2FPreviewImage.cpp;h=b80bf9415b5175bdabf77d1e50b2af144e733137;hb=38c2cde0d8695ac5287bae218c4a33a2acf18ef8;hp=80e8e2013513575cc8dfc500a7d9f554d70c10b7;hpb=2047ea5eb436d98d485bed672ed218f9bd708ce6;p=lyx.git diff --git a/src/graphics/PreviewImage.cpp b/src/graphics/PreviewImage.cpp index 80e8e20135..b80bf9415b 100644 --- a/src/graphics/PreviewImage.cpp +++ b/src/graphics/PreviewImage.cpp @@ -20,7 +20,6 @@ #include "support/FileName.h" -#include "support/bind.h" using namespace std; using namespace lyx::support; @@ -28,7 +27,7 @@ using namespace lyx::support; namespace lyx { namespace graphics { -class PreviewImage::Impl : public boost::signals2::trackable { +class PreviewImage::Impl { public: /// Impl(PreviewImage & p, PreviewLoader & l, @@ -99,15 +98,20 @@ Image const * PreviewImage::image() const } -PreviewImage::Impl::Impl(PreviewImage & p, PreviewLoader & l, - string const & s, - FileName const & bf, - double af) - : parent_(p), ploader_(l), iloader_(bf), +PreviewLoader & PreviewImage::previewLoader() const +{ + return pimpl_->ploader_; +} + + +PreviewImage::Impl::Impl(PreviewImage & p, PreviewLoader & l, string const & s, + FileName const & bf, double af) + : parent_(p), ploader_(l), iloader_(l.buffer().fileName(), bf), snippet_(s), ascent_frac_(af) { iloader_.setDisplayPixelRatio(l.displayPixelRatio()); - iloader_.connect(bind(&Impl::statusChanged, this)); + // This connection is destroyed at the same time as this. + iloader_.connect([this](){ statusChanged(); }); }