mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-09 18:31:04 +00:00
Better variable name
I think this one must be a leftover from before the ranges.
This commit is contained in:
parent
731c2e2c35
commit
1aa890629b
@ -2375,8 +2375,8 @@ bool Paragraph::allowedInContext(Cursor const & cur, InsetLayout const & il) con
|
||||
if (in_allowed_inset && inInset().asInsetText() && il.allowedOccurrences() != -1) {
|
||||
ParagraphList & pars = cur.text()->paragraphs();
|
||||
for (Paragraph const & par : pars) {
|
||||
for (auto const & table : par.insetList())
|
||||
if (table.inset->getLayout().name() == il.name())
|
||||
for (auto const & elem : par.insetList())
|
||||
if (elem.inset->getLayout().name() == il.name())
|
||||
++have_ins;
|
||||
}
|
||||
if (have_ins >= il.allowedOccurrences())
|
||||
@ -2412,8 +2412,8 @@ bool Paragraph::allowedInContext(Cursor const & cur, InsetLayout const & il) con
|
||||
for (; pit <= lastpit; ++pit) {
|
||||
if (&pars[pit].layout() != d->layout_)
|
||||
break;
|
||||
for (auto const & table : pars[pit].insetList())
|
||||
if (table.inset->getLayout().name() == il.name())
|
||||
for (auto const & elem : pars[pit].insetList())
|
||||
if (elem.inset->getLayout().name() == il.name())
|
||||
++have_ins;
|
||||
}
|
||||
if (have_ins >= il.allowedOccurrences())
|
||||
|
@ -1195,10 +1195,10 @@ void InsetText::iterateForToc(DocIterator const & cdit, bool output_active,
|
||||
// If we find an InsetArgument that is supposed to provide the TOC caption,
|
||||
// we'll save it for use later.
|
||||
InsetArgument const * arginset = nullptr;
|
||||
for (auto const & table : par.insetList()) {
|
||||
dit.pos() = table.pos;
|
||||
table.inset->addToToc(dit, doing_output, utype, backend);
|
||||
if (InsetArgument const * x = table.inset->asInsetArgument())
|
||||
for (auto const & elem : par.insetList()) {
|
||||
dit.pos() = elem.pos;
|
||||
elem.inset->addToToc(dit, doing_output, utype, backend);
|
||||
if (InsetArgument const * x = elem.inset->asInsetArgument())
|
||||
if (x->isTocCaption())
|
||||
arginset = x;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user