From d1bc775b0616c76122476028ac094e75103551f4 Mon Sep 17 00:00:00 2001 From: Abdelrazak Younes Date: Sun, 18 May 2008 13:50:49 +0000 Subject: [PATCH] Fix cursor positioning bug in TocBackend. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@24815 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/TocBackend.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/TocBackend.cpp b/src/TocBackend.cpp index e1a5416e14..e4504c47b8 100644 --- a/src/TocBackend.cpp +++ b/src/TocBackend.cpp @@ -176,6 +176,7 @@ void TocBackend::update() case OPTARG_CODE: { if (!tocstring.empty()) break; + pit.pos() = 0; Paragraph const & par = *static_cast(inset).paragraphs().begin(); if (!pit->labelString().empty()) @@ -192,6 +193,7 @@ void TocBackend::update() int const toclevel = pit->layout().toclevel; if (toclevel != Layout::NOT_IN_TOC && toclevel >= min_toclevel) { + pit.pos() = 0; // insert this into the table of contents if (tocstring.empty()) tocstring = pit->asString(true);