X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Finsets%2Finsetfloat.C;h=523602e99361a87d2c99d5aaa6e250bb88961eca;hb=e28331ed63062dea10d0a21b9ec12034b4b17b9a;hp=f6117854e182cd2281c68b316ad9b211c420d1e8;hpb=2734cc154853c61a7ea54bfeea3adc908f68bdc5;p=lyx.git diff --git a/src/insets/insetfloat.C b/src/insets/insetfloat.C index f6117854e1..523602e993 100644 --- a/src/insets/insetfloat.C +++ b/src/insets/insetfloat.C @@ -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(toclist[type].size() + 1) + convert(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; } } }