diff --git a/src/insets/ChangeLog b/src/insets/ChangeLog index 115278a745..6ac5408a22 100644 --- a/src/insets/ChangeLog +++ b/src/insets/ChangeLog @@ -1,3 +1,9 @@ +2003-02-25 John Levon + + * insetgraphicsParams.h: + * insetgraphics.C: don't start a load process if + the inset is set to NoDisplay (bug #920) + 2003-02-22 John Levon * insetfloat.C: diff --git a/src/insets/insetgraphics.C b/src/insets/insetgraphics.C index 064dd5371e..604bcc37e3 100644 --- a/src/insets/insetgraphics.C +++ b/src/insets/insetgraphics.C @@ -219,7 +219,7 @@ string const InsetGraphics::statusMessage() const switch (cache_->loader.status()) { case grfx::WaitingToLoad: - msg = _("Waiting for draw request to start loading..."); + msg = _("Not shown."); break; case grfx::Loading: msg = _("Loading..."); @@ -344,7 +344,10 @@ void InsetGraphics::draw(BufferView * bv, LyXFont const & font, int old_x = int(x); x += lwidth; - if (cache_->loader.status() == grfx::WaitingToLoad) + grfx::Params const & gparams = params().as_grfxParams(); + + if (gparams.display != grfx::NoDisplay + && cache_->loader.status() == grfx::WaitingToLoad) cache_->loader.startLoading(*this, *bv); if (!cache_->loader.monitoring()) diff --git a/src/insets/insetgraphicsParams.h b/src/insets/insetgraphicsParams.h index 9c3c362a60..edbafeb03d 100644 --- a/src/insets/insetgraphicsParams.h +++ b/src/insets/insetgraphicsParams.h @@ -76,7 +76,7 @@ struct InsetGraphicsParams // Only a subset of InsetGraphicsParams is needed for display purposes. // This function also interrogates lyxrc to ascertain whether // to display or not. - grfx::Params as_grfxParams(string const & filepath) const; + grfx::Params as_grfxParams(string const & filepath = string()) const; private: /// Initialize the object to a default status.