mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-09 18:31:04 +00:00
* Validator.{cpp, h}:
- add usignedGlueLengthValidator * GuiVSpace.cpp: - re-allow the insertion of glue lengths (regression of the qt4 frontend) (bug 6097) git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@30692 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
768b216c83
commit
3020ec058f
@ -59,7 +59,7 @@ GuiVSpace::GuiVSpace(GuiView & lv)
|
||||
connect(unitCO, SIGNAL(selectionChanged(lyx::Length::UNIT)),
|
||||
this, SLOT(change_adaptor()));
|
||||
|
||||
valueLE->setValidator(unsignedLengthValidator(valueLE));
|
||||
valueLE->setValidator(unsignedGlueLengthValidator(valueLE));
|
||||
|
||||
// Manage the ok, apply, restore and cancel/close buttons
|
||||
bc().setPolicy(ButtonPolicy::OkApplyCancelReadOnlyPolicy);
|
||||
|
@ -89,6 +89,14 @@ LengthValidator * unsignedLengthValidator(QLineEdit * ed)
|
||||
}
|
||||
|
||||
|
||||
LengthValidator * unsignedGlueLengthValidator(QLineEdit * ed)
|
||||
{
|
||||
LengthValidator * v = new LengthValidator(ed);
|
||||
v->setBottom(GlueLength());
|
||||
return v;
|
||||
}
|
||||
|
||||
|
||||
LengthAutoValidator::LengthAutoValidator(QWidget * parent, QString const autotext)
|
||||
: LengthValidator(parent),
|
||||
autotext_(autotext)
|
||||
|
@ -75,6 +75,13 @@ private:
|
||||
/// @returns a new @c LengthValidator that does not accept negative lengths.
|
||||
LengthValidator * unsignedLengthValidator(QLineEdit *);
|
||||
|
||||
|
||||
/** @returns a new @c LengthValidator that does not accept negative lengths.
|
||||
* but glue lengths.
|
||||
*/
|
||||
LengthValidator * unsignedGlueLengthValidator(QLineEdit *);
|
||||
|
||||
|
||||
/** A class to ascertain whether the data passed to the @c validate()
|
||||
* member function can be interpretted as a GlueLength or is @param autotext.
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user