]> git.lyx.org Git - lyx.git/blobdiff - src/graphics/PreviewImage.cpp
Add \makeat switches to babel settings if necessary.
[lyx.git] / src / graphics / PreviewImage.cpp
index 5402ae8bd819427f720fd26810a08f30dbe517ca..58e25fbd06122d2fc4126635a059c7f32c145db0 100644 (file)
@@ -16,9 +16,8 @@
 #include "PreviewLoader.h"
 
 #include "support/FileName.h"
-#include "support/lyxlib.h"
 
-#include <boost/bind.hpp>
+#include "support/bind.h"
 
 using namespace std;
 using namespace lyx::support;
@@ -71,6 +70,12 @@ string const & PreviewImage::snippet() const
 }
 
 
+support::FileName const & PreviewImage::filename() const
+{
+       return pimpl_->iloader_.filename();
+}
+
+
 Dimension PreviewImage::dim() const
 {
        Dimension dim;
@@ -98,7 +103,7 @@ PreviewImage::Impl::Impl(PreviewImage & p, PreviewLoader & l,
        : parent_(p), ploader_(l), iloader_(bf),
          snippet_(s), ascent_frac_(af)
 {
-       iloader_.connect(boost::bind(&Impl::statusChanged, this));
+       iloader_.connect(bind(&Impl::statusChanged, this));
 }
 
 
@@ -134,7 +139,10 @@ void PreviewImage::Impl::statusChanged()
        case ErrorUnknown:
                //iloader_.filename().removeFile();
                ploader_.remove(snippet_);
-               break;
+               // FIXME: We need to return here, because PreviewLoader::remove
+               // removes the preview image from the cache, which deletes this
+               // object, so we should not try to do anything here.
+               return;
 
        case Ready:
                iloader_.filename().removeFile();