On 04/25/2016 01:01 PM, Scott Kostyshak wrote: > On Mon, Apr 25, 2016 at 11:48:00AM -0400, Richard Heck wrote: >> On 04/24/2016 10:21 PM, Cyrille Artho wrote: >>> Scott Kostyshak wrote: >>>> In 2.1.x, because of a bug in our validator code, we allowed negative >>>> values to be input into some document settings. This bug has been fixed >>>> for 2.2.0dev but what that means is that if you open such a document >>>> with LyX 2.2.0dev, you will not be able to save any changes to document >>>> settings unless you correct the negative values and it is not obvious to >>>> the user that this must be done. I can imagine this causing some >>>> confusion. >>>> >>>> For more details, see: >>>> http://www.lyx.org/trac/ticket/10095#comment:2 >>>> >>>> I'm not sure that we want to do anything for 2.2.0, but I wanted to >>>> check with the list to see the thoughts of others. For example, we could >>>> change the validators in page margins to allow negative values, which >>>> seem to work as intended with LaTeX. Or we could provide a warning when >>>> creating the document settings dialog that explains why the "OK" button >>>> is disabled. >>>> >>>> Scott >>>> >>> I would unconditionally allow negative values. They are often used to >>> fix issues with padding that is too large or incorrect bounding boxes >>> in images. >>> >>> If you suddenly break documents where users relied on negative >>> margins/spacing to fix other problems, you create more problems than >>> you solve. >> So it seems to me that we need to correct the validator. Otherwise, we >> will break documents, since people can't change the document settings >> without "fixing" the negative values. > Seems reasonable to me and probably a safe change. It would be good to > figure out exactly which settings could suffer from this issue.
These ones ../frontends/qt4/ [master] > grep -P 'unsigned\w*Validator' GuiDocument.cpp textLayoutModule->indentLE->setValidator(unsignedLengthValidator( textLayoutModule->skipLE->setValidator(unsignedGlueLengthValidator( pageLayoutModule->paperheightLE->setValidator(unsignedLengthValidator( pageLayoutModule->paperwidthLE->setValidator(unsignedLengthValidator( marginsModule->topLE->setValidator(unsignedLengthValidator( marginsModule->bottomLE->setValidator(unsignedLengthValidator( marginsModule->innerLE->setValidator(unsignedLengthValidator( marginsModule->outerLE->setValidator(unsignedLengthValidator( marginsModule->headsepLE->setValidator(unsignedLengthValidator( marginsModule->headheightLE->setValidator(unsignedLengthValidator( marginsModule->footskipLE->setValidator(unsignedLengthValidator( marginsModule->columnsepLE->setValidator(unsignedLengthValidator( all use unsigned validators, so the question is which ones ought to allow signed quantities. Richard