mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-29 05:01:49 +00:00
HSpace/VSpace: use a _signed_ length validator in the dialogs.
This commit is contained in:
parent
5e7cbc8f2c
commit
2a8db0a64b
@ -81,10 +81,13 @@ GuiHSpace::GuiHSpace(bool math_mode, QWidget * parent)
|
||||
connect(fillPatternCO, SIGNAL(activated(int)),
|
||||
this, SLOT(changedSlot()));
|
||||
|
||||
// Set up a signed (glue) length validator
|
||||
LengthValidator * v = new LengthValidator(valueLE);
|
||||
if (math_mode_)
|
||||
valueLE->setValidator(unsignedLengthValidator(valueLE));
|
||||
v->setBottom(Length());
|
||||
else
|
||||
valueLE->setValidator(unsignedGlueLengthValidator(valueLE));
|
||||
v->setBottom(GlueLength());
|
||||
valueLE->setValidator(v);
|
||||
|
||||
// initialize the length validator
|
||||
addCheckedWidget(valueLE, valueL);
|
||||
|
@ -53,7 +53,10 @@ GuiVSpace::GuiVSpace(QWidget * parent) : InsetParamsWidget(parent)
|
||||
connect(spacingCO, SIGNAL(activated(int)),
|
||||
this, SLOT(enableCustom(int)));
|
||||
|
||||
valueLE->setValidator(unsignedGlueLengthValidator(valueLE));
|
||||
// Set up a signed glue length validator
|
||||
LengthValidator * v = new LengthValidator(valueLE);
|
||||
v->setBottom(GlueLength());
|
||||
valueLE->setValidator(v);
|
||||
|
||||
// initialize the length validator
|
||||
addCheckedWidget(valueLE, valueL);
|
||||
|
Loading…
Reference in New Issue
Block a user