]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/qt4/GuiVSpace.cpp
On Linux show in crash message box the backtrace
[lyx.git] / src / frontends / qt4 / GuiVSpace.cpp
index 984464a9b83593193dfd802da33418bb0de72f91..13b873443da5550e0e5e5eae884e279d03aac9de 100644 (file)
@@ -21,7 +21,6 @@
 #include "qt_helpers.h"
 #include "Validator.h"
 
-#include "FuncRequest.h"
 #include "Spacing.h"
 #include "VSpace.h"
 
@@ -58,6 +57,7 @@ GuiVSpace::GuiVSpace(QWidget * parent) : InsetParamsWidget(parent)
 
        // initialize the length validator
        addCheckedWidget(valueLE, valueL);
+       enableCustom(spacingCO->currentIndex());
 }
 
 
@@ -65,7 +65,11 @@ void GuiVSpace::enableCustom(int selection)
 {
        bool const enable = selection == 5;
        valueLE->setEnabled(enable);
+       if (enable)
+               valueLE->setFocus();
+       valueL->setEnabled(enable);
        unitCO->setEnabled(enable);
+       changed();
 }
 
 
@@ -139,6 +143,7 @@ void GuiVSpace::paramsToDialog(Inset const * inset)
        InsetVSpace const * vs = static_cast<InsetVSpace const *>(inset);
        VSpace const & params = vs->space();
        setWidgetsFromVSpace(params, spacingCO, valueLE, unitCO, keepCB);
+       enableCustom(spacingCO->currentIndex());
 }
 
 } // namespace frontend