+2003-10-13 Angus Leeming <leeming@lyx.org>
+
+ * formula.C (editing_inset): pass a pointer rather than a reference.
+
2003-10-13 Angus Leeming <leeming@lyx.org>
* formula.C: remove #include "PreviewImage.h".
namespace {
-bool editing_inset(InsetFormula const & inset)
+bool editing_inset(InsetFormula const * inset)
{
- return (mathcursor &&
- mathcursor->formula() == const_cast<InsetFormula *>(&inset));
+ return mathcursor &&
+ (const_cast<InsetFormulaBase const *>(mathcursor->formula()) ==
+ inset);
}
} // namespace anon
cache(pi.base.bv);
// The previews are drawn only when we're not editing the inset.
- bool const use_preview = (!editing_inset(*this) &&
+ bool const use_preview = (!editing_inset(this) &&
preview_->previewReady());
int const w = dim_.wid;
!= lcolor.getX11Name(LColor::background))
p.pain.fillRectangle(x, y - a, w, h, LColor::mathbg);
- if (editing_inset(*this)) {
+ if (editing_inset(this)) {
mathcursor->drawSelection(pi);
//p.pain.rectangle(x, y - a, w, h, LColor::mathframe);
}
void InsetFormula::metrics(MetricsInfo & m, Dimension & dim) const
{
- bool const use_preview = (!editing_inset(*this) &&
+ bool const use_preview = (!editing_inset(this) &&
preview_->previewReady());
if (use_preview) {