diff --git a/src/frontends/qt4/GuiParagraph.cpp b/src/frontends/qt4/GuiParagraph.cpp index 183b1fe1cc..b959008954 100644 --- a/src/frontends/qt4/GuiParagraph.cpp +++ b/src/frontends/qt4/GuiParagraph.cpp @@ -242,8 +242,7 @@ void GuiParagraph::updateView() // label width docstring const & labelwidth = pp.labelWidthString(); - // FIXME We should not compare translated strings - if (labelwidth != _("Senseless with this layout!")) { + if (hasLabelwidth()) { labelwidthGB->setEnabled(true); labelWidth->setText(toqstr(labelwidth)); } else { @@ -354,6 +353,14 @@ LyXAlignment GuiParagraph::alignDefault() const } +bool GuiParagraph::hasLabelwidth() const +{ + Layout layout = bufferview()->cursor().innerParagraph().layout(); + return (layout.margintype == MARGIN_MANUAL + || layout.latextype == LATEX_BIB_ENVIRONMENT); +} + + void GuiParagraph::saveSession() const { Dialog::saveSession(); diff --git a/src/frontends/qt4/GuiParagraph.h b/src/frontends/qt4/GuiParagraph.h index 25c08240a3..335fc23cd9 100644 --- a/src/frontends/qt4/GuiParagraph.h +++ b/src/frontends/qt4/GuiParagraph.h @@ -65,6 +65,8 @@ private: /// bool canIndent() const; /// + bool hasLabelwidth() const; + /// LyXAlignment alignPossible() const; /// LyXAlignment alignDefault() const;