From 7e22abec5d8b1e96a41cce80f4f0c8aa66a713fb Mon Sep 17 00:00:00 2001 From: Juergen Spitzmueller Date: Tue, 12 Nov 2013 15:48:34 +0100 Subject: [PATCH] Fix bug 8880: do not try to validate custom value if it is disabled --- src/frontends/qt4/GuiHSpace.cpp | 6 +++++- src/frontends/qt4/InsetParamsWidget.cpp | 4 ++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/src/frontends/qt4/GuiHSpace.cpp b/src/frontends/qt4/GuiHSpace.cpp index 47adacd884..fc09f51dc3 100644 --- a/src/frontends/qt4/GuiHSpace.cpp +++ b/src/frontends/qt4/GuiHSpace.cpp @@ -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); } diff --git a/src/frontends/qt4/InsetParamsWidget.cpp b/src/frontends/qt4/InsetParamsWidget.cpp index 317ad50234..96d39ab37d 100644 --- a/src/frontends/qt4/InsetParamsWidget.cpp +++ b/src/frontends/qt4/InsetParamsWidget.cpp @@ -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); -- 2.39.2