]> 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 dc08bc0c3188f630b2f7b55d82eb09f1f771054e..13b873443da5550e0e5e5eae884e279d03aac9de 100644 (file)
@@ -57,6 +57,7 @@ GuiVSpace::GuiVSpace(QWidget * parent) : InsetParamsWidget(parent)
 
        // initialize the length validator
        addCheckedWidget(valueLE, valueL);
+       enableCustom(spacingCO->currentIndex());
 }
 
 
@@ -64,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();
 }
 
 
@@ -138,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