mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-22 10:00:33 +00:00
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:
parent
3b4b047576
commit
ca3077b40b
@ -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);
|
||||
|
@ -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>&Indent Paragraph</string>
|
||||
<string>&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>
|
||||
|
Loading…
Reference in New Issue
Block a user