]> git.lyx.org Git - lyx.git/blobdiff - src/buffer_funcs.cpp
* do not lookup the same macro all the time
[lyx.git] / src / buffer_funcs.cpp
index 7a8618cc1564d3ebf30557a68dfcabacd507ba5f..e53f89780548988fcf6ec64f7a2cf4004efa4bb2 100644 (file)
@@ -419,6 +419,10 @@ void setCaptions(Paragraph & par, TextClass const & textclass)
                }
                else if (inset.lyxCode() == Inset::LISTINGS_CODE)
                        setCaptionLabels(inset, "listing", from_ascii("Listing"), counters);
+               else if (inset.lyxCode() == Inset::INCLUDE_CODE)
+                       // if this include inset contains lstinputlisting, and has a caption
+                       // it will increase the 'listing' counter by one
+                       static_cast<InsetInclude &>(inset).updateCounter(counters);
        }
 }