]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/qt4/GuiPrintNomencl.cpp
On Linux show in crash message box the backtrace
[lyx.git] / src / frontends / qt4 / GuiPrintNomencl.cpp
index 2054f599442a5545684910913f0623f796cae068..1e41e3e93b1e508b467e14dc6f033640c947320d 100644 (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);
 }