Peter Kümmel wrote:
Bennett Helm wrote:
On May 9, 2007, at 3:45 PM, Peter Kümmel wrote:

Bennett Helm wrote:
Patrick De Visschere noted on the User's list that:

If you change the environment of a blanco line (from Standard) to
Paragraph and then type text on the line LyX crashes.
I can confirm this on current svn. Here's the backtrace:
Here too, (Windows). Attached patch fixes it.
Could you test it on the Mac?
Works for me as well. Thanks!

Bennett

This patch is better, but is it the best way to fix it?
Any TOC experts?

That's me ;-)

You patch is good but the real problem is that the Paragraph layout is not considered of section type. A call to TocBackend::update() is missing somewhere.

Abdel.





------------------------------------------------------------------------

Index: src/TocBackend.cpp
===================================================================
--- src/TocBackend.cpp  (revision 18243)
+++ src/TocBackend.cpp  (working copy)
@@ -123,6 +123,9 @@
void TocBackend::updateItem(ParConstIterator const & par_it)
 {
+       if (toc("tableofcontents").empty())
+               return;
+
        BufferParams const & bufparams = buffer_->params();
        const int min_toclevel = bufparams.getTextClass().min_toclevel();

Reply via email to