[LyX/master] Allow negative offset in GuiLine (#13102)
Juergen Spitzmueller
spitz at lyx.org
Wed Sep 25 07:53:38 UTC 2024
commit 2244ac3dee416235b49e671b67d63d2ca1f4dcb6
Author: Juergen Spitzmueller <spitz at lyx.org>
Date: Wed Sep 25 09:53:00 2024 +0200
Allow negative offset in GuiLine (#13102)
---
src/frontends/qt/GuiLine.cpp | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/src/frontends/qt/GuiLine.cpp b/src/frontends/qt/GuiLine.cpp
index 2a8b9de2bc..8587a5d6eb 100644
--- a/src/frontends/qt/GuiLine.cpp
+++ b/src/frontends/qt/GuiLine.cpp
@@ -56,7 +56,10 @@ GuiLine::GuiLine(QWidget * parent) : InsetParamsWidget(parent)
addCheckedWidget(WidthLE, WidthValueL);
addCheckedWidget(HeightLE, HeightValueL);
- OffsetLE->setValidator(unsignedGlueLengthValidator(OffsetLE));
+ // Set up a signed glue length validator
+ LengthValidator * v = new LengthValidator(OffsetLE);
+ v->setBottom(GlueLength());
+ OffsetLE->setValidator(v);
WidthLE->setValidator(unsignedGlueLengthValidator(WidthLE));
HeightLE->setValidator(unsignedGlueLengthValidator(HeightLE));
More information about the lyx-cvs
mailing list