fix signal crash with gcc 3.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19591 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Abdelrazak Younes 2007-08-15 15:13:22 +00:00
parent 9ac7aa9115
commit bf33e34869
2 changed files with 8 additions and 2 deletions

View File

@ -40,7 +40,7 @@ using std::auto_ptr;
RenderGraphic::RenderGraphic(Inset const * inset)
{
loader_.connect(boost::bind(&LyX::updateInset,
loader_connection_ = loader_.connect(boost::bind(&LyX::updateInset,
boost::cref(LyX::cref()), inset));
}
@ -51,7 +51,7 @@ RenderGraphic::RenderGraphic(RenderGraphic const & other,
loader_(other.loader_),
params_(other.params_)
{
loader_.connect(boost::bind(&LyX::updateInset,
loader_connection_ = loader_.connect(boost::bind(&LyX::updateInset,
boost::cref(LyX::cref()), inset));
}

View File

@ -17,6 +17,7 @@
#include "graphics/GraphicsLoader.h"
#include "graphics/GraphicsParams.h"
#include <boost/signal.hpp>
namespace lyx {
@ -28,6 +29,8 @@ public:
RenderGraphic(RenderGraphic const &, Inset const *);
std::auto_ptr<RenderBase> clone(Inset const *) const;
~RenderGraphic() { loader_connection_.disconnect(); }
/// compute the size of the object returned in dim
bool metrics(MetricsInfo & mi, Dimension & dim) const;
/// draw inset
@ -46,6 +49,9 @@ private:
/// The stored data.
graphics::Loader loader_;
graphics::Params params_;
//
boost::signals::connection loader_connection_;
};