Angus Leeming wrote:

> André, how does InsetFormula know when it is being edited?
> Is the test below correct?
> 
> void InsetFormula::draw(PainterInfo & pi, int x, int y) const
> {
> // The previews are updated/drawn only when we're not editing the
> inset. bool const editing_inset = mathcursor &&
> mathcursor->formula() == this;

There's also this test. Which is 'better'/cheaper?

bool InsetFormula::PreviewImpl::previewWanted(Buffer const &) const {
        return !parent_.par_->asNestInset()->editing();
}

-- 
Angus

Reply via email to