+2003-02-26 Alfredo Braunstein <abraunst@libero.it>
+
+ * GraphicsLoader.[Ch],
+ * PreviewImage.[Ch],
+ * PreviewedInset.C: Removed unneeded list of owner insets
+
2003-02-25 Alfredo Braunstein <abraunst@libero.it>
* GraphicsConverter (startConversion): add the call to
void createPixmap();
///
- void startLoading(Inset const &);
+ void startLoading();
/// The loading status of the image.
ImageStatus status_;
///
Params params_;
- // Multiple Insets can share the same image
- typedef std::list<Inset const *> InsetList;
- ///
- InsetList insets;
};
{
if (pimpl_->status_ != WaitingToLoad || !pimpl_->cached_item_.get())
return;
- pimpl_->cached_item_->startLoading();
-}
-
-
-void Loader::startLoading(Inset const & inset) const
-{
- if (pimpl_->status_ != WaitingToLoad || !pimpl_->cached_item_.get())
- return;
- pimpl_->startLoading(inset);
+ pimpl_->startLoading();
}
}
-void Loader::Impl::startLoading(Inset const & inset)
+void Loader::Impl::startLoading()
{
if (status_ != WaitingToLoad)
return;
- InsetList::const_iterator it = insets.begin();
- InsetList::const_iterator end = insets.end();
- it = std::find(it, end, &inset);
- if (it == end)
- insets.push_back(&inset);
-
LoaderQueue::get().touch(cached_item_);
}
///
bool empty() const { return filename().empty(); }
- /// We are explicit about when we begin the loading process.
- void startLoading() const;
-
/** starting loading of the image is done by a urgency-based
* decision. Here we only call LoaderQueue::touch to request it.
*/
- void startLoading(Inset const &) const;
+ void startLoading() const;
/** Monitor any changes to the file.
* There is no point monitoring the file before startLoading() is
///
~Impl();
///
- Image const * image(Inset const &);
+ Image const * image();
///
void statusChanged();
}
-Image const * PreviewImage::image(Inset const & inset) const
+Image const * PreviewImage::image() const
{
- return pimpl_->image(inset);
+ return pimpl_->image();
}
}
-Image const * PreviewImage::Impl::image(Inset const & inset)
+Image const * PreviewImage::Impl::image()
{
if (iloader_.status() == WaitingToLoad)
- iloader_.startLoading(inset);
+ iloader_.startLoading();
return iloader_.image();
}
/** If the image is not yet loaded (WaitingToLoad), then this method
* triggers that.
*/
- Image const * image(Inset const & inset) const;
+ Image const * image() const;
private:
/// Use the Pimpl idiom to hide the internals.
if (!pimage_)
return false;
- return pimage_->image(inset_);
+ return pimage_->image();
}
+2003-02-26 Alfredo Braunstein <abraunst@libero.it>
+
+ * insetgraphics.C (draw)
+ * insetinclude.C (draw): Eliminate also the other argument (owner
+ inset inset) in the call to PreviewImage::image
+
2003-02-25 Alfredo Braunstein <abraunst@libero.it>
* insetgraphics.C (draw)
if (gparams.display != grfx::NoDisplay
&& cache_->loader.status() == grfx::WaitingToLoad)
- cache_->loader.startLoading(*this);
+ cache_->loader.startLoading();
if (!cache_->loader.monitoring())
cache_->loader.startMonitoring();
int const h = a + d;
bv->painter().image(x, y - a, w, h,
- *(preview_->pimage()->image(*this)));
+ *(preview_->pimage()->image()));
xx += w;
}
-003-02-26 Angus Leeming <leeming@lyx.org>
+2003-02-26 Alfredo Braunstein <abraunst@libero.it>
+
+ * formula.C (draw): strip also the other argument (the owner inset) in
+ the call to PreviewImage::image
+
+2003-02-26 Angus Leeming <leeming@lyx.org>
* ref_inset.[Ch]: add a localDispatch method to RefInset.
add a string2RefInset function to 'translate' the string passed to the
if (use_preview) {
pi.pain.image(x + 1, y - a, w, h, // one pixel gap in front
- *(preview_->pimage()->image(*this)));
+ *(preview_->pimage()->image()));
} else {
pi.base.style = LM_ST_TEXT;
pi.base.font = font;