diff --git a/src/graphics/ChangeLog b/src/graphics/ChangeLog index 1586f13517..d6078d495e 100644 --- a/src/graphics/ChangeLog +++ b/src/graphics/ChangeLog @@ -1,3 +1,7 @@ +2003-06-04 Angus Leeming + + * GraphicsLoader.C (Loader copy c-tor): make it work as expected. ;-) + 2003-06-03 Angus Leeming * GraphicsLoader.[Ch] (Loader): add copy constructor. diff --git a/src/graphics/GraphicsLoader.C b/src/graphics/GraphicsLoader.C index cba47a8f44..3fe180f17d 100644 --- a/src/graphics/GraphicsLoader.C +++ b/src/graphics/GraphicsLoader.C @@ -79,15 +79,18 @@ Loader::Loader(string const & file, DisplayType type) Loader::Loader(string const & file, Params const & params) - : pimpl_(new Impl(params)) + : pimpl_(new Impl(Params())) { reset(file, params); } Loader::Loader(Loader const & other) - : pimpl_(new Impl(other.pimpl_->params())) -{} + : pimpl_(new Impl(Params())) +{ + Params const & params = other.pimpl_->params(); + reset(params.filename, params); +} Loader::~Loader() @@ -274,7 +277,6 @@ void Loader::Impl::createPixmap() } } - void Loader::Impl::startLoading() { if (status_ != WaitingToLoad) diff --git a/src/insets/ChangeLog b/src/insets/ChangeLog index 14a2ee38b3..f9fe96770f 100644 --- a/src/insets/ChangeLog +++ b/src/insets/ChangeLog @@ -1,3 +1,7 @@ +2003-06-04 Angus Leeming + + * graphicinset.C (draw): add a comment for the #if 0 block. + 2003-06-04 André Pönitz * inset.[Ch]: change owner_ from Inset * to UpdatableInset * diff --git a/src/insets/graphicinset.C b/src/insets/graphicinset.C index a67e1c0408..a4e5a93c64 100644 --- a/src/insets/graphicinset.C +++ b/src/insets/graphicinset.C @@ -43,9 +43,9 @@ void GraphicInset::update(grfx::Params const & params) { params_ = params; - if (!params.filename.empty()) { - lyx::Assert(AbsolutePath(params.filename)); - loader_.reset(params.filename, params); + if (!params_.filename.empty()) { + lyx::Assert(AbsolutePath(params_.filename)); + loader_.reset(params_.filename, params_); } } @@ -194,6 +194,9 @@ void GraphicInset::draw(PainterInfo & pi, int x, int y) const view(pi.base.bv); #if 0 + // Comment this out and see if anything goes wrong. + // The explanation for why it _was_ needed once upon a time is below. + // MakeAbsPath returns filename_ unchanged if it is absolute // already. string const file_with_path = @@ -219,7 +222,7 @@ void GraphicInset::draw(PainterInfo & pi, int x, int y) const loader_.status() == grfx::WaitingToLoad) loader_.startLoading(); - if (!loader_.monitoring()) + if (params_.display != grfx::NoDisplay && !loader_.monitoring()) loader_.startMonitoring(); // This will draw the graphics. If the graphics has not been loaded yet,