mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-10 20:04:46 +00:00
Fix cursor positioning bug in TocBackend.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@24815 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
98d3ca8bd8
commit
d1bc775b06
@ -176,6 +176,7 @@ void TocBackend::update()
|
||||
case OPTARG_CODE: {
|
||||
if (!tocstring.empty())
|
||||
break;
|
||||
pit.pos() = 0;
|
||||
Paragraph const & par =
|
||||
*static_cast<InsetOptArg&>(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);
|
||||
|
Loading…
Reference in New Issue
Block a user