]> git.lyx.org Git - features.git/commitdiff
Consider nesting when checking whether an inset is in a title
authorJuergen Spitzmueller <spitz@lyx.org>
Mon, 10 Aug 2020 06:54:56 +0000 (08:54 +0200)
committerJuergen Spitzmueller <spitz@lyx.org>
Mon, 10 Aug 2020 06:54:56 +0000 (08:54 +0200)
Amends e2a29fe55686

No status entry needed.

src/insets/InsetText.cpp

index 358a377542ddb96c89531c48dea0a82253aada16..94f8c38c0c8c34ec434b20e2dc867006aec27322 100644 (file)
@@ -796,6 +796,14 @@ void InsetText::updateBuffer(ParIterator const & it, UpdateType utype)
                // Record in this inset is embedded in a title layout
                // This is needed to decide when \maketitle is output.
                intitle_context_ = it.paragraph().layout().intitle;
+               // Also check embedding layouts
+               size_t const n = it.depth();
+               for (size_t i = 0; i < n; ++i) {
+                       if (it[i].paragraph().layout().intitle) {
+                               intitle_context_ = true;
+                               break;
+                       }
+               }
        } else {
                DocumentClass const & tclass = buffer().masterBuffer()->params().documentClass();
                // Note that we do not need to call: