* GuiParagraph.{cpp, h}:

- fix enabling/disabling of "Longest Label" widget.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@29806 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Jürgen Spitzmüller 2009-05-23 07:45:46 +00:00
parent caf8a509fa
commit 0227cef5bd
2 changed files with 11 additions and 2 deletions

View File

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

View File

@ -65,6 +65,8 @@ private:
///
bool canIndent() const;
///
bool hasLabelwidth() const;
///
LyXAlignment alignPossible() const;
///
LyXAlignment alignDefault() const;