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 cur
Stefan Schimanski wrote:
> + // possibly the row metrics are outdated and the endpos() was
> computed + // before the paragraph was changed (e.g. by backspace)
> + end_ = std::min(par.size(), row.endpos()) - 1;
> +
This solution looks OK to me for now.
Jürgen
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
prob
On Sat, Jun 02, 2007 at 06:17:46PM +0200, Stefan Schimanski wrote:
> Another possibility of course (which I proposed somewhere in the
> other thread about the backspace case of Dov) is so redo the metrics
> of the current paragraph before setting the current font again. But
> then I guess the
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 t
Stefan Schimanski wrote:
Another possibility of course (which I proposed somewhere in the other
thread about the backspace case of Dov) is so redo the metrics of the
current paragraph before setting the current font again. But then I
guess they are computed twice, also during the paragraph upda
Another possibility of course (which I proposed somewhere in the
other thread about the backspace case of Dov) is so redo the metrics
of the current paragraph before setting the current font again. But
then I guess they are computed twice, also during the paragraph
update later.
Stefan
A
Hi!
In http://bugzilla.lyx.org/show_bug.cgi?id=3790 a bug is reported
that LyX crashes when deleting a display math at the end of a
paragraph. In fact the same bug can also be triggered by backspace,
enter to rebreak the paragraph and probably many more ways.
The reason is that Text::setC