>>>>> "Martin" == Martin Vermeer <[EMAIL PROTECTED]> writes:
>> And do you think it would be too difficult to fix the real cause? Martin> My patch does that... imperfectly. The value is now sensible, Martin> but often a bit generous. Yes, I saw that afterwards, but failed to edit the message correctly :) Martin> Yes... I see that too. What actually happens is (as I Martin> understand) Running under gdb, I noticed that InsetCollapsable::metrics is called twice when creating a new note inset. The reason is that it is called twice in InsetTabular::metrics: if (!p_width.zero()) m.base.textwidth = p_width.inPixels(mi.base.textwidth); tabular.getCellInset(cell)->metrics(m, dim); if (!p_width.zero()) dim.wid = m.base.textwidth; tabular.setWidthOfCell(cell, dim.wid); if (p_width.zero()) { m.base.textwidth = dim.wid + 1; tabular.getCellInset(cell)->metrics(m, dim); } Isn't there a way to reduce to one call? The first call sets openinlined_ to true, the second one to false. When typing in the note inset, it gets worse: every key generates 6 calls to InsetCollapsable::metrics ! Martin> An easier fix might be to have another look at the Martin> openinlined_ behaviour in insetcollapsable. It looks reasonable to me, provided that we give the right data as input. What I am not sure of, is what value of openinlined_ we want to obtain. I tend to think it should be true whenever possible. Martin> Shall I commit this patch to 1.4 (and 1.5) as it creates sane Martin> behaviour with only a cosmetic wart? I'll try to play with it myself. JMarc