]> git.lyx.org Git - lyx.git/blobdiff - src/TocBackend.cpp
Tooltips for collapsables and branches
[lyx.git] / src / TocBackend.cpp
index fd28f9572e33589766743f594efe2ac1a936a3fb..89880831b2b84a2f6408d3cccd5abd4b2cdbb500 100644 (file)
@@ -204,12 +204,11 @@ TocIterator TocBackend::item(string const & type,
        --it;
 
        ParConstIterator par_it_text = par_it;
-       if (par_it_text.inMathed())
-               // It would be better to do
-               //   par_it_text.backwardInset();
-               // but this method does not exist.
+       if (par_it_text.inMathed()) {
+               // We are only interested in text so remove the math CursorSlice.
                while (par_it_text.inMathed())
-                       par_it_text.backwardPos();
+                       par_it_text.pop_back();
+       }
 
        for (; it != last; --it) {
                // We verify that we don't compare contents of two