Stefan Schimanski wrote:

Am 23.12.2007 um 21:06 schrieb Abdelrazak Younes:

Stefan Schimanski wrote:
Yes :-). And believed me or not, that's what I had in mind. I am happy to see it is easier to implement than I initially thought.

With that change we can also remove many setDimCache calls everywhere in the math insets.

Right.
I removed all of them now. Works fine. What about InsetMathHull/Grid? Is there any need for the coordcache for them? They don't have a MathData "around", just the paragraph.

I am not sure about that, and this is related to that:

So what about caching the dimensions of insets (which are directly in the paragraph) in the TextMetrics::redoParagraph loop?

But we do that already:

                ii->inset->metrics(mi, dim);
                Dimension const old_dim = pm.insetDimension(ii->inset);
                pm.setInsetDimension(ii->inset, dim);


Then we should have the same behavior for insets in paragraphs as for those in MathData.

You are probably confused by the fact that we do both caching right now, in the coord cache (which we should get rid of) and in the ParagraphMetrics (see setInsetDimension).

And then probably all the other setDimCache calls of non-math insets can go as well...

Right.

Abdel.

Reply via email to