Second shot. This basically works, i.e. basic insets (labels), math, and simple text (notes etc) work, nested tables don't.
There are still quite a few occasions where the metrics() call is too late (the tables e.g.). I think this can be solved by calling metrics() in the screen's update but I got stuck in the whole RowPainter/LyXText/whatever mess. Throwing out all update() and replacing calls to update with calls to metrics() might eventually work. As I said, I don't have time to work on that during the next two weeks, but I'd be glad if someone could have a look. Andre'
metrics.diff.gz
Description: application/gunzip