char const * MathMLtype() const;
///
void setSymbol(latexkeys const * sym) { sym_ = sym; }
+ ///
+ DocIterator const & pos() { return pos_; }
/// lock while being drawn to avoid recursions
int lock() const { return ++lockCount_; }
: InsetMathNest(that), d(new Private(*that.d))
{
d->updateChildren(this);
+ if (d->macro_ && lyxrc.preview == LyXRC::PREVIEW_ON) {
+ // We need to update d->macro_ by ourselves because in this case
+ // MathData::metrics() is not called when selecting a math inset
+ DocIterator const & pos = d->macroBackup_.pos();
+ d->macro_ = pos.buffer()->getMacro(name(), pos);
+ if (!d->macro_)
+ d->macro_ = &d->macroBackup_;
+ }
}
InsetMathNest::operator=(that);
*d = *that.d;
d->updateChildren(this);
+ if (d->macro_ && lyxrc.preview == LyXRC::PREVIEW_ON) {
+ // We need to update d->macro_ by ourselves because in this case
+ // MathData::metrics() is not called when selecting a math inset
+ DocIterator const & pos = d->macroBackup_.pos();
+ d->macro_ = pos.buffer()->getMacro(name(), pos);
+ if (!d->macro_)
+ d->macro_ = &d->macroBackup_;
+ }
return *this;
}