mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-22 18:08:10 +00:00
Do not step counters in deleted material.
Also, display the counter as "#" if the inset is deleted.
(cherry picked from commit 200064e9a4
)
This commit is contained in:
parent
a05da2121c
commit
51239977c5
@ -146,9 +146,13 @@ void InsetFlex::updateBuffer(ParIterator const & it, UpdateType utype)
|
|||||||
docstring const & count = il.counter();
|
docstring const & count = il.counter();
|
||||||
bool const have_counter = cnts.hasCounter(count);
|
bool const have_counter = cnts.hasCounter(count);
|
||||||
if (have_counter) {
|
if (have_counter) {
|
||||||
cnts.step(count, utype);
|
Paragraph const & par = it.paragraph();
|
||||||
custom_label += ' ' +
|
if (!par.isDeleted(it.pos())) {
|
||||||
cnts.theCounter(count, it.paragraph().getParLanguage(bp)->code());
|
cnts.step(count, utype);
|
||||||
|
custom_label += ' ' +
|
||||||
|
cnts.theCounter(count, it.paragraph().getParLanguage(bp)->code());
|
||||||
|
} else
|
||||||
|
custom_label += ' ' + from_ascii("#");
|
||||||
}
|
}
|
||||||
setLabel(custom_label);
|
setLabel(custom_label);
|
||||||
|
|
||||||
|
@ -84,9 +84,14 @@ void InsetFoot::updateBuffer(ParIterator const & it, UpdateType utype)
|
|||||||
InsetLayout const & il = getLayout();
|
InsetLayout const & il = getLayout();
|
||||||
docstring const & count = il.counter();
|
docstring const & count = il.counter();
|
||||||
custom_label_ = translateIfPossible(il.labelstring());
|
custom_label_ = translateIfPossible(il.labelstring());
|
||||||
if (cnts.hasCounter(count))
|
|
||||||
cnts.step(count, utype);
|
Paragraph const & par = it.paragraph();
|
||||||
custom_label_ += ' ' + cnts.theCounter(count, lang->code());
|
if (!par.isDeleted(it.pos())) {
|
||||||
|
if (cnts.hasCounter(count))
|
||||||
|
cnts.step(count, utype);
|
||||||
|
custom_label_ += ' ' + cnts.theCounter(count, lang->code());
|
||||||
|
} else
|
||||||
|
custom_label_ += ' ' + from_ascii("#");
|
||||||
setLabel(custom_label_);
|
setLabel(custom_label_);
|
||||||
|
|
||||||
InsetCollapsible::updateBuffer(it, utype);
|
InsetCollapsible::updateBuffer(it, utype);
|
||||||
|
Loading…
Reference in New Issue
Block a user