From: Yuriy Skalko Date: Thu, 27 Aug 2020 23:03:23 +0000 (+0300) Subject: Prevent permanent disabling of comboboxes in Vertical/Horizontal space dialogs X-Git-Tag: 2.3.6~47 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=eb132b3b95f68ec762567080b586d4a4725fc4da;p=features.git Prevent permanent disabling of comboboxes in Vertical/Horizontal space dialogs --- diff --git a/src/frontends/qt4/GuiHSpace.cpp b/src/frontends/qt4/GuiHSpace.cpp index 4307ae0e0f..da2889085e 100644 --- a/src/frontends/qt4/GuiHSpace.cpp +++ b/src/frontends/qt4/GuiHSpace.cpp @@ -305,13 +305,17 @@ docstring GuiHSpace::dialogToParams() const bool GuiHSpace::checkWidgets(bool readonly) const { valueLE->setReadOnly(readonly); - + spacingCO->setEnabled(!readonly); + spacingL->setEnabled(!readonly); + if (readonly) { - spacingCO->setEnabled(false); - unitCO->setEnabled(false); fillPatternCO->setEnabled(false); + fillPatternL->setEnabled(false); keepCB->setEnabled(false); + keepL->setEnabled(false); valueLE->setEnabled(false); + valueL->setEnabled(false); + unitCO->setEnabled(false); } else enableWidgets(); diff --git a/src/frontends/qt4/GuiVSpace.cpp b/src/frontends/qt4/GuiVSpace.cpp index 6eec95846b..5f12b56ff2 100644 --- a/src/frontends/qt4/GuiVSpace.cpp +++ b/src/frontends/qt4/GuiVSpace.cpp @@ -152,18 +152,19 @@ void GuiVSpace::paramsToDialog(Inset const * inset) bool GuiVSpace::checkWidgets(bool readonly) const { - valueLE->setReadOnly(readonly); keepCB->setEnabled(!readonly); + keepL->setEnabled(!readonly); + spacingCO->setEnabled(!readonly); + spacingL->setEnabled(!readonly); - if (readonly) { - spacingCO->setEnabled(false); - unitCO->setEnabled(false); - } else { - bool const enable = (spacingCO->currentIndex() == 5); - valueLE->setEnabled(enable); - valueL->setEnabled(enable); - unitCO->setEnabled(enable); - } + valueLE->setReadOnly(readonly); + + bool const enable_custom = + !readonly && (spacingCO->currentIndex() == 5); + + valueL->setEnabled(enable_custom); + valueLE->setEnabled(enable_custom); + unitCO->setEnabled(enable_custom); return InsetParamsWidget::checkWidgets(); } diff --git a/status.23x b/status.23x index 23f5d67087..aef6ca68ad 100644 --- a/status.23x +++ b/status.23x @@ -93,6 +93,9 @@ What's new - Maintain standard layout for separating paragraphs when switching layouts (bug 11936). +- Prevent permanent disabling of widgets in Vertical/Horizontal Space dialogs + (bug 11952). + * INTERNALS