]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/qt4/GuiHSpace.cpp
QDialogButtonBox for the remaining dialogs.
[lyx.git] / src / frontends / qt4 / GuiHSpace.cpp
index 93de4bb69576ca4297167efc2a214458a20932a9..4307ae0e0f35ec1f659719dc5f85ab542705ee63 100644 (file)
@@ -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);
@@ -292,7 +295,7 @@ docstring GuiHSpace::dialogToParams() const
                        params.kind = keepCB->isChecked() ?
                                InsetSpaceParams::CUSTOM_PROTECTED : InsetSpaceParams::CUSTOM;
                        params.length = GlueLength(widgetsToLength(valueLE, unitCO));
-       } else if (item == "visible") 
+       } else if (item == "visible")
                params.kind = InsetSpaceParams::VISIBLE;
 
        return from_ascii(InsetSpace::params2string(params));