mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-08 10:51:03 +00:00
* 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:
parent
caf8a509fa
commit
0227cef5bd
@ -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();
|
||||
|
@ -65,6 +65,8 @@ private:
|
||||
///
|
||||
bool canIndent() const;
|
||||
///
|
||||
bool hasLabelwidth() const;
|
||||
///
|
||||
LyXAlignment alignPossible() const;
|
||||
///
|
||||
LyXAlignment alignDefault() const;
|
||||
|
Loading…
Reference in New Issue
Block a user