]> git.lyx.org Git - features.git/commitdiff
Consider nesting when checking whether an inset is in a title
authorJuergen Spitzmueller <spitz@lyx.org>
Sun, 9 Aug 2020 10:01:49 +0000 (12:01 +0200)
committerJuergen Spitzmueller <spitz@lyx.org>
Sun, 9 Aug 2020 10:01:49 +0000 (12:01 +0200)
Amends 0bddf448ef5

src/insets/InsetText.cpp

index e448a3fd39dd8d847838f35cddd6783daee92b4d..10b15c88edad34abd39a31fb90b9223ff2700e91 100644 (file)
@@ -873,6 +873,14 @@ void InsetText::updateBuffer(ParIterator const & it, UpdateType utype, bool cons
                // 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: