if (par.isInset(pos)) {
InsetOld const * tmpinset = par.getInset(pos);
if (tmpinset) {
-#if 1 // this is needed for deep update on initialitation
-#warning inset->update FIXME
- //tmpinset->update(bv());
- LyXFont const tmpfont = getFont(pit, pos);
- Dimension dim;
- MetricsInfo mi(bv(), tmpfont, workWidth());
- tmpinset->metrics(mi, dim);
- maxwidth += dim.wid;
- maxasc = max(maxasc, dim.asc);
- maxdesc = max(maxdesc, dim.des);
-#else
maxwidth += tmpinset->width();
maxasc = max(maxasc, tmpinset->ascent());
maxdesc = max(maxdesc, tmpinset->descent());
-#endif
}
} else {
// Fall-back to normal case
}
cursorLeft(bv());
-
- // the layout things can change the height of a row !
- setHeightOfRow(cursor.par(), cursorRow());
+ redoParagraph(cursor.par());
return;
}
}
height -= rit->height();
pit->rows.clear();
+ // redo insets
+ InsetList::iterator ii = pit->insetlist.begin();
+ InsetList::iterator iend = pit->insetlist.end();
+ for (; ii != iend; ++ii) {
+ Dimension dim;
+ MetricsInfo mi(bv(), getFont(pit, ii->pos), 0);
+ ii->inset->metrics(mi, dim);
+ }
+
// rebreak the paragraph
for (pos_type z = 0; z < pit->size() + 1; ) {
Row row(z);
height = 0;
//anchor_y_ = 0;
-
- ParagraphList::iterator pit = ownerParagraphs().begin();
- ParagraphList::iterator end = ownerParagraphs().end();
-
- for (; pit != end; ++pit) {
- pit->rows.clear();
-
- InsetList::iterator ii = pit->insetlist.begin();
- InsetList::iterator iend = pit->insetlist.end();
- for (; ii != iend; ++ii) {
- Dimension dim;
- MetricsInfo m = mi;
-#warning FIXME: pos != 0
- m.base.font = getFont(pit, 0);
- ii->inset->metrics(m, dim);
- }
-
- redoParagraph(pit);
- }
+ redoParagraphs(ownerParagraphs().begin(), ownerParagraphs().end());
// final dimension
dim.asc = firstRow()->ascent_of_text();
if (tmp->params().startOfAppendix()) {
recordUndo(bv, Undo::ATOMIC, tmp);
tmp->params().startOfAppendix(false);
- setHeightOfRow(tmp, getRow(tmp, 0));
+ redoParagraph(tmp);
break;
}
}