]> git.lyx.org Git - features.git/commitdiff
Fix bug 8880: do not try to validate custom value if it is disabled
authorJuergen Spitzmueller <spitz@lyx.org>
Tue, 12 Nov 2013 14:48:34 +0000 (15:48 +0100)
committerJuergen Spitzmueller <spitz@lyx.org>
Tue, 12 Nov 2013 14:48:34 +0000 (15:48 +0100)
src/frontends/qt4/GuiHSpace.cpp
src/frontends/qt4/InsetParamsWidget.cpp

index 47adacd8840108dd9cdbcbf440ab1218d69a513b..fc09f51dc38a6ec9b35206eb76e5b4493748fa80 100644 (file)
@@ -104,12 +104,16 @@ void GuiHSpace::enableWidgets()
        QString const selection = spacingCO->itemData(spacingCO->currentIndex()).toString();
        bool const custom = selection == "custom";
        valueLE->setEnabled(custom);
+       valueL->setEnabled(custom);
        unitCO->setEnabled(custom);
        fillPatternCO->setEnabled(!math_mode_ && selection == "hfill");
+       fillPatternL->setEnabled(!math_mode_ && selection == "hfill");
        bool const no_pattern = fillPatternCO->currentIndex() == 0 || math_mode_;
        bool const enable_keep =
-               selection == "normal" || selection == "halfquad" || (selection == "hfill" && no_pattern) || custom;
+               selection == "normal" || selection == "halfquad"
+               || (selection == "hfill" && no_pattern) || custom;
        keepCB->setEnabled(enable_keep);
+       keepL->setEnabled(enable_keep);
 }
 
 
index 317ad5023480839fede641f1ed63601b135e8477..96d39ab37dbd7ef967fff31bf4c5659cd628ace9 100644 (file)
@@ -29,6 +29,10 @@ CheckedWidget::CheckedWidget(QLineEdit * input, QWidget * label)
 
 bool CheckedWidget::check() const
 {
+       // Ignore if widget is disabled.
+       if (!input_->isEnabled())
+               return true;
+
        bool const valid = input_->hasAcceptableInput();
        // Visual feedback.
        setValid(input_, valid);