mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-22 05:16:21 +00:00
Move some unsigned validators to signed (#10095)
2.1.x allows some document settings to have negative values where
2.2.0rc1 does not (because of the bug fix at 9e166088
). If a user of
2.2.0rc1 opens a document from 2.1.x that contains one such negative
value, it will appear as though no change to the document settings
can be saved because 2.2.0rc1 treats the document settings as
invalid immediately on opening the dialog. Further, unless the user
manually goes through each tab they will not see the red text next
to the input that is now considered invalid. This could lead to
confusion for users. One example of such confusion is [1].
The following settings now allow negative values, which is
consistent with 2.1.x. Negative values in these settings do not lead
to LaTeX errors:
- Text Layout tab: the two line edits enabled with "Custom"
- Page Margins tab: all eight line edits
The following settings are not changed by this commit, so they now
(with 2.2.0) do not allow negative values that 2.1.x allowed. This
change makes sense because negative values lead to LaTeX errors in
these cases:
- Page Layout tab: the "Height" and "Width" line edits, which are
enabled when "Custom" is selected
[1] https://www.mail-archive.com/search?l=mid&q=CAGZ2pgXqf27UaAaQ%3De_wFz1fGTa6Yv0iFyS97qu1C7B5R59irg%40mail.gmail.com
This commit is contained in:
parent
6390e6264e
commit
262dfd3826
@ -703,9 +703,9 @@ GuiDocument::GuiDocument(GuiView & lv)
|
||||
|
||||
textLayoutModule->lspacingLE->setValidator(new QDoubleValidator(
|
||||
textLayoutModule->lspacingLE));
|
||||
textLayoutModule->indentLE->setValidator(unsignedLengthValidator(
|
||||
textLayoutModule->indentLE->setValidator(new LengthValidator(
|
||||
textLayoutModule->indentLE));
|
||||
textLayoutModule->skipLE->setValidator(unsignedGlueLengthValidator(
|
||||
textLayoutModule->skipLE->setValidator(new LengthValidator(
|
||||
textLayoutModule->skipLE));
|
||||
|
||||
textLayoutModule->indentCO->addItem(qt_("Default"));
|
||||
@ -966,21 +966,21 @@ GuiDocument::GuiDocument(GuiView & lv)
|
||||
this, SLOT(change_adaptor()));
|
||||
connect(marginsModule->columnsepUnit, SIGNAL(activated(int)),
|
||||
this, SLOT(change_adaptor()));
|
||||
marginsModule->topLE->setValidator(unsignedLengthValidator(
|
||||
marginsModule->topLE->setValidator(new LengthValidator(
|
||||
marginsModule->topLE));
|
||||
marginsModule->bottomLE->setValidator(unsignedLengthValidator(
|
||||
marginsModule->bottomLE->setValidator(new LengthValidator(
|
||||
marginsModule->bottomLE));
|
||||
marginsModule->innerLE->setValidator(unsignedLengthValidator(
|
||||
marginsModule->innerLE->setValidator(new LengthValidator(
|
||||
marginsModule->innerLE));
|
||||
marginsModule->outerLE->setValidator(unsignedLengthValidator(
|
||||
marginsModule->outerLE->setValidator(new LengthValidator(
|
||||
marginsModule->outerLE));
|
||||
marginsModule->headsepLE->setValidator(unsignedLengthValidator(
|
||||
marginsModule->headsepLE->setValidator(new LengthValidator(
|
||||
marginsModule->headsepLE));
|
||||
marginsModule->headheightLE->setValidator(unsignedLengthValidator(
|
||||
marginsModule->headheightLE->setValidator(new LengthValidator(
|
||||
marginsModule->headheightLE));
|
||||
marginsModule->footskipLE->setValidator(unsignedLengthValidator(
|
||||
marginsModule->footskipLE->setValidator(new LengthValidator(
|
||||
marginsModule->footskipLE));
|
||||
marginsModule->columnsepLE->setValidator(unsignedLengthValidator(
|
||||
marginsModule->columnsepLE->setValidator(new LengthValidator(
|
||||
marginsModule->columnsepLE));
|
||||
|
||||
bc().addCheckedLineEdit(marginsModule->topLE,
|
||||
|
Loading…
Reference in New Issue
Block a user