// updateMetrics() does not update paragraph position
// This is done at draw() time. So we need a redraw!
- // We pass true so that metrics are computed for the sake
- // of having MacroData updated.
- buffer_.changed(true);
+ buffer_.changed(false);
if (needsFitCursor()) {
// The cursor is off screen so ensure it is visible.
// This event (moving without mouse click) is not passed further.
// This should be changed if it is further utilized.
- // We pass true so that metrics are computed for the sake
- // of having MacroData updated.
- buffer_.changed(true);
+ buffer_.changed(false);
}
}
void MathMacro::write(WriteStream & os) const
{
- bool user_macro = !MacroTable::globalMacros().get(name());
- bool textmode_macro = user_macro ? false : d->macro_ && d->macro_->symbol()
- && d->macro_->symbol()->extra == "textmode";
- bool needs_mathmode = user_macro ? bool(d->macro_) : d->macro_ && (!d->macro_->symbol()
- || d->macro_->symbol()->extra != "textmode");
+ MacroData const * data = MacroTable::globalMacros().get(name());
+ bool textmode_macro = data && data->symbol()
+ && data->symbol()->extra == "textmode";
+ bool needs_mathmode = data && (!data->symbol()
+ || data->symbol()->extra != "textmode");
MathEnsurer ensurer(os, needs_mathmode, true, textmode_macro);