]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/qt4/GuiVSpace.cpp
* fix spelling in comments to please John.
[lyx.git] / src / frontends / qt4 / GuiVSpace.cpp
index ec4ae3cf7d1eb8f63f4e24f5614509d1df00612a..70d2ba7e6e4f7ffc642969da6645207bf8024ccf 100644 (file)
@@ -3,12 +3,12 @@
  * This file is part of LyX, the document processor.
  * Licence details can be found in the file COPYING.
  *
- * \author André Pönitz
- * \author Jürgen Vigna
+ * \author André Pönitz
+ * \author Jürgen Vigna
  * \author Rob Lahaye
  * \author Angus Leeming
  * \author Edwin Leuven
- * \author Jürgen Spitzmüller
+ * \author Jürgen Spitzmüller
  *
  * Full author contact details are available in file CREDITS.
  */
@@ -21,7 +21,6 @@
 #include "qt_helpers.h"
 #include "Validator.h"
 
-#include "LyXRC.h" // to set the default length values
 #include "Spacing.h"
 #include "FuncRequest.h"
 
@@ -60,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);
@@ -76,9 +75,6 @@ GuiVSpace::GuiVSpace(GuiView & lv)
 
        // initialize the length validator
        bc().addCheckedLineEdit(valueLE, valueL);
-
-       // remove the %-items from the unit choice
-       unitCO->noPercents();
 }
 
 
@@ -114,8 +110,7 @@ static void setWidgetsFromVSpace(VSpace const & space,
        spacing->setCurrentIndex(item);
        keep->setChecked(space.keep());
 
-       Length::UNIT default_unit =
-                       (lyxrc.default_papersize > 3) ? Length::CM : Length::IN;
+       Length::UNIT const default_unit = Length::defaultUnit();
        bool const custom_vspace = space.kind() == VSpace::LENGTH;
        if (custom_vspace) {
                value->setEnabled(true);