]> git.lyx.org Git - lyx.git/blobdiff - src/TocBuilder.cpp
Amend 207eaeee9071cb
[lyx.git] / src / TocBuilder.cpp
index dada6f0435f71fd1267d217c287d20c5ff4b907e..aff19bc2b1d570275e9c2e9d682d21d715e50299 100644 (file)
@@ -61,13 +61,13 @@ void TocBuilder::captionItem(DocIterator const & dit, docstring const & s,
                stack_.top().is_captioned = true;
        } else {
                // This is a new entry.
-               pop();
                // the dit is at the float's level, e.g. for the contextual menu of
                // outliner entries
                DocIterator captionable_dit = dit;
                captionable_dit.pop_back();
                pushItem(captionable_dit, s, output_active, true);
                (*toc_)[stack_.top().pos].setAction(func);
+               pop();
        }
 }