Hello,

I'm again testing the LyX 1.4.x branch and found another annoying bug.

When the Graphics dialog is opened to modify the properties of a graphic, and no information has previously been entered on the Clipping tab, LyX activates the "Get from File" function and grabs the bounding box information from the current graphic file. This is probably done to make it easier to customize these values. If you don't modify them, nothing will change.

That's all a good thing. It goes wrong when LyX is unable to get the bounding box from a file. This happens for example with all MATLAB generated EPS files (see below). This time the values on the Clipping tab are cleared (they become empty, not zero).

I don't really mind that these values are not filled in, but the problem is that you cannot press the OK button anymore, because it's detected that the bounding box text boxes contain invalid values (the labels become red), even though I did not modify anything and never clicked the Clipping tab.

Because the problem is totally invisible, it took me a lot of time to find out that this was actually the thing going wrong and to figure out why I could not press the OK button.

To fix this, LyX should set the bounding box values to 0 when unable to get them from the file, instead of making the text box empty. Or maybe only check for valid values whenever the user modified a value (otherwise the value is not going to be saved anyway and there is no point to check it).

The actual reason why the bounding box value cannot be read is that it contains spaces:

%%BoundingBox:    87   262   507   578

That should probably be fixed as well. Both look like very obvious things that are easy to fix. The bug however is quite a big one when working with MATLAB images. You keep removing and inserting graphics if the OK button doesn't work :)

Joost

Reply via email to