]> git.lyx.org Git - lyx.git/blobdiff - src/insets/insetfloat.C
* src/LyXAction.C: mark goto-clear-bookmark as working without buffer
[lyx.git] / src / insets / insetfloat.C
index f6117854e182cd2281c68b316ad9b211c420d1e8..523602e99361a87d2c99d5aaa6e250bb88961eca 100644 (file)
@@ -384,12 +384,12 @@ void InsetFloat::addToToc(TocList & toclist, Buffer const & buf) const
        // Find a caption layout in one of the (child inset's) pars
        for (; pit != end; ++pit) {
                if (pit->layout()->labeltype == LABEL_SENSITIVE) {
-                       string const type = params_.type;
+                       Toc & toc = toclist[params_.type];
                        docstring const str =
-                               convert<docstring>(toclist[type].size() + 1)
+                               convert<docstring>(toc.size() + 1)
                                + ". " + pit->asString(buf, false);
-                       TocItem const item(pit, 0, str);
-                       toclist[type].push_back(item);
+                       toc.push_back(TocItem(pit, 0, str));
+                       return;
                }
        }
 }