-template<class F>
-void fixMacroInstancesFunctional(Cursor const & from,
- docstring const & name, F & fix) {
- Cursor dit = from;
-
- for (; dit; dit.forwardPos()) {
- // only until a macro is redefined
- if (dit.inset().lyxCode() == MATHMACRO_CODE) {
- MathMacroTemplate const & macroTemplate
- = static_cast<MathMacroTemplate const &>(dit.inset());
- if (macroTemplate.name() == name)
- break;
+ if (!preview_hulls.empty()) {
+ // reload the scheduled previews
+ set<DocIterator>::const_iterator sit = preview_hulls.begin();
+ set<DocIterator>::const_iterator end = preview_hulls.end();
+ for (; sit != end; ++sit) {
+ InsetMathHull * inset_hull =
+ sit->nextInset()->asInsetMath()->asHullInset();
+ LASSERT(inset_hull, /**/);
+ inset_hull->reloadPreview(*sit);