GuiPrintNomencl.cpp: fix bug #7853

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@39959 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Uwe Stöhr 2011-10-24 23:35:01 +00:00
parent 46e4463066
commit 981e958b9d

View File

@ -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);
}