Stefan Schimanski wrote:
If that's too risky / too hard until after the 1.5.0 release, then I prefer your previous solution, of forcing a recalculation of the metrics before calling computeTables --- as you pointed out to me, even though we'll be computing the metrics twice that way, it's probably negligible next to the redrawing...

Somehow it doesn't belong there to recompute the metrics. It should be part of the update flags of the cursor.

The suggestion of modifying computeTables itself seems a little hackish: so why are you trusting the row for the start_ position?

It might be incorrect. But it cannot cause a crash. A paragraph always starts at 0 and ends at par.size()-1. So as long as we stay in this interval the computeTables is safe, even if the metrics are not the right one.

Can you try to make a patch implementing a setCurrentFont flag in the cursor update flags?
I could imagine that it is not so complicated after all anyway. Let's see.

I'm willing to try, but as I said, I don't have nearly as much time to put into LyX as I'd like to, so it'll take a while --- I don't believe I'll get to it this week. So in the meantime one of the hacks (up to you) should be applied, just mark it clearly with a FIXME and an outline of the correct solution, as Andre' pointed out...

Thanks!
Dov

Stefan



Reply via email to