On Thu, 10 May 2007 18:37:49 +0300 Micha Feigin <[EMAIL PROTECTED]> wrote:
> On Wed, 9 May 2007 10:07:50 +0000 (UTC) > Jean-Pierre Chrֳ©tien <[EMAIL PROTECTED]> wrote: > > > 3242 > > Looks to me that way. I ran into the same problem with parbox but the patch I > sent solves both (the later one, I made a mistake at first, the one that > uses logical not, !, and not the bitwise not ~). > > The patch assumes that a zero size means that no height was inserted. It > has the side effect that it doesn't allow to enter a zero size explicitly > though. > > IIRC the height value has the ability to set an unset value (need to check), > but the dialog doesn't allow to leave the field empty (it automatically sets > it to 0 if you erase the content). I'm not sure if it is a qt "feature" or a > lyx implementation though. > It appears that Length has an option for an empty length (unit type empty). I looked into the dialog also and the field is a text field so it seems that there is some callback that forces the value to zero if it is empty. I believe the full solution is to change the callback to leave the box empty if it's value is deleted (should also probably be the default value) and to store the unit as empty if the box is empty. All of this doesn't change the patch much since when it is implemented the only things that needs to be change is _param.height.zero() to _param.height.empty(), the rest of it is needed as is. I'm afraid that I don't have the time for this before at least sometime in the middle of next week. Any chance that this patch will go in sometime (before or after the extra work, which would only go to allow entering a height of 0)? My current test also show that the default value of 1\totalheigt should also work correctly (not sure what the difference is to an empty input) the problem is that it is not used on import with empty input (0pt is used instead) and it is much less intuitive to look for.