Fix crash when outline pane is launched while the cursor is within a math matrix within a section. The problem was that DocIterator::backwardPos() does not work inside a math matrix.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22933 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Abdelrazak Younes 2008-02-11 07:47:04 +00:00
parent f12126adbd
commit 00189c2ebd

View 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