2001-12-24 Juergen Vigna <jug@sad.it>
+ * buffer.C (parseSingleLyXformat2Token): fixed 2 compatibility read
+ problems. First check a minipage also if we have some ert-contents
+ (not only on par->size(), second set the right depth of the paragraph
+ on the relink to the root-paragraph-list!
+
* undo_funcs.C (textHandleUndo): fixed a stupid earlier wrong fix
which then did not anymore update the main paragraphs on undo/redo!
#ifndef NO_PEXTRA_REALLY
// I wonder if we could use this blanket fix for all the
// checkminipage cases...
- if (par && par->size()) {
+ // don't forget about ert paragraphs and compatibility read for'em
+ if (par && (par->size() || !ert_comp.contents.empty())) {
// It is possible that this will check to often,
// but that should not be an correctness issue.
// Only a speed issue.
//
// BEGIN pextra_minipage compability
// This should be removed in 1.3.x (Lgb)
+ // I don't think we should remove this so fast (Jug)
// This compability code is not perfect. In a couple
// of rand cases it fails. When the minipage par is
lyxerr << "WP:" << mini->width() << endl;
mini->width(tostr(par->params().pextraWidthp())+"%");
}
+ Paragraph * op = mini->firstParagraph();
mini->inset.paragraph(par);
+ //
+ // and free the old ones!
+ //
+ while(op) {
+ Paragraph * pp = op->next();
+ delete op;
+ op = pp;
+ }
// Insert the minipage last in the
// previous paragraph.
if (par->params().pextraHfill()) {
tmp = tmp->next();
}
depth = parBeforeMinipage->params().depth();
+ // and set this depth on the par as it has not been set already
+ par->params().depth(depth);
minipar = parBeforeMinipage = 0;
} else if (!minipar &&
(par->params().pextraType() == Paragraph::PEXTRA_MINIPAGE))