From 981e958b9d63930c83b1adced65b75b3d857ac97 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Uwe=20St=C3=B6hr?= Date: Mon, 24 Oct 2011 23:35:01 +0000 Subject: [PATCH] GuiPrintNomencl.cpp: fix bug #7853 git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@39959 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/frontends/qt4/GuiPrintNomencl.cpp | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/src/frontends/qt4/GuiPrintNomencl.cpp b/src/frontends/qt4/GuiPrintNomencl.cpp index 2054f59944..1e41e3e93b 100644 --- a/src/frontends/qt4/GuiPrintNomencl.cpp +++ b/src/frontends/qt4/GuiPrintNomencl.cpp @@ -56,8 +56,7 @@ GuiPrintNomencl::GuiPrintNomencl(QWidget * parent) : InsetParamsWidget(parent) void GuiPrintNomencl::on_setWidthCO_activated(int i) { bool const custom = - (setWidthCO->itemData(i).toString() - == "custom"); + (setWidthCO->itemData(i).toString() == "custom"); valueLE->setEnabled(custom); unitLC->setEnabled(custom); valueLA->setEnabled(custom); @@ -70,10 +69,14 @@ void GuiPrintNomencl::paramsToDialog(InsetCommandParams const & params) setWidthCO->setCurrentIndex( setWidthCO->findData(toqstr(params["set_width"]))); - lengthToWidgets(valueLE, - unitLC, - params["width"], - Length::defaultUnit()); + lengthToWidgets(valueLE, unitLC, + params["width"], Length::defaultUnit()); + + bool const custom = + (setWidthCO->itemData(setWidthCO->currentIndex()).toString() == "custom"); + valueLE->setEnabled(custom); + unitLC->setEnabled(custom); + valueLA->setEnabled(custom); }