Change the logic of the indentation setting.

The option here is to NOT indent the paragraph, so make that clear.
As it was, we would set "Indent" to false in the case of paragraphs
that do not permit indentation and then write that, uselessly, to the
LyX file if we wrote any other option (and then keep writing it, even
if other options were removed). Now, we will write it only if it's been
explicitly set.
This commit is contained in:
Richard Kimberly Heck 2020-10-30 13:34:36 -04:00
parent 3b4b047576
commit ca3077b40b
2 changed files with 9 additions and 9 deletions

View File

@ -61,7 +61,7 @@ GuiParagraph::GuiParagraph(GuiView & lv)
connect(linespacing, SIGNAL(activated(int)), this, SLOT(changed()));
connect(linespacingValue, SIGNAL(textChanged(QString)),
this, SLOT(changed()));
connect(indentCB, SIGNAL(clicked()), this, SLOT(changed()));
connect(noindentCB, SIGNAL(clicked()), this, SLOT(changed()));
connect(labelWidth, SIGNAL(textChanged(QString)),
this, SLOT(changed()));
@ -237,7 +237,7 @@ void GuiParagraph::applyView()
// label width
params_.labelWidthString(qstring_to_ucs4(labelWidth->text()));
// indentation
params_.noindent(!indentCB->isChecked());
params_.noindent(noindentCB->isChecked());
dispatchParams();
}
@ -265,8 +265,8 @@ void GuiParagraph::updateView()
//indentation
bool const canindent = canIndent();
indentCB->setEnabled(canindent);
indentCB->setChecked(canindent && !pp.noindent());
noindentCB->setEnabled(canindent);
noindentCB->setChecked(canindent && pp.noindent());
// linespacing
int ls;
@ -314,7 +314,7 @@ void GuiParagraph::updateView()
void GuiParagraph::enableView(bool enable)
{
indentCB->setEnabled(enable);
noindentCB->setEnabled(canIndent() && enable);
linespacing->setEnabled(enable);
labelWidth->setEnabled(enable);
synchronizedViewCB->setEnabled(enable);

View File

@ -6,7 +6,7 @@
<rect>
<x>0</x>
<y>0</y>
<width>438</width>
<width>487</width>
<height>303</height>
</rect>
</property>
@ -196,9 +196,9 @@
</widget>
</item>
<item row="2" column="0">
<widget class="QCheckBox" name="indentCB">
<widget class="QCheckBox" name="noindentCB">
<property name="text">
<string>&amp;Indent Paragraph</string>
<string>&amp;Do Not Indent Paragraph</string>
</property>
</widget>
</item>
@ -251,7 +251,7 @@
<tabstop>linespacing</tabstop>
<tabstop>linespacingValue</tabstop>
<tabstop>labelWidth</tabstop>
<tabstop>indentCB</tabstop>
<tabstop>noindentCB</tabstop>
<tabstop>alignDefaultRB</tabstop>
<tabstop>alignJustRB</tabstop>
<tabstop>alignLeftRB</tabstop>