From 950e4b2097dc828e9604d4364ee53f7eb16e5c5a Mon Sep 17 00:00:00 2001 From: =?utf8?q?Peter=20K=C3=BCmmel?= Date: Thu, 10 May 2007 17:55:07 +0000 Subject: [PATCH] fix crash: change empty line to paragraph and press a key git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18259 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/TocBackend.cpp | 5 + src/frontends/qt4/ui/ListingsUi.ui | 225 ++++++++++++++--------------- 2 files changed, 113 insertions(+), 117 deletions(-) diff --git a/src/TocBackend.cpp b/src/TocBackend.cpp index a8c755b148..e805917bf1 100644 --- a/src/TocBackend.cpp +++ b/src/TocBackend.cpp @@ -123,6 +123,11 @@ Toc const & TocBackend::toc(std::string const & type) const void TocBackend::updateItem(ParConstIterator const & par_it) { + // TODO should not happen, + // a call to TocBackend::update() is missing somewhere + if (toc("tableofcontents").empty()) + return; + BufferParams const & bufparams = buffer_->params(); const int min_toclevel = bufparams.getTextClass().min_toclevel(); diff --git a/src/frontends/qt4/ui/ListingsUi.ui b/src/frontends/qt4/ui/ListingsUi.ui index 6ebfee0e13..045c975493 100644 --- a/src/frontends/qt4/ui/ListingsUi.ui +++ b/src/frontends/qt4/ui/ListingsUi.ui @@ -8,8 +8,8 @@ 0 0 - 451 - 392 + 448 + 417 @@ -18,135 +18,126 @@ true - - - - 10 - 10 - 431 - 371 - - - - - 0 - - - 6 - - - - - Inlined listing (\lstinline) - - - - - - - - 7 - 7 - 0 - 0 - - - - Parameters - - - - - 10 - 100 - 411 - 171 - + + + + + 6 + + + 0 + + + 0 + + + 0 + + + 0 + + + + + Inlined listing (\lstinline) - - - - 10 - 20 - 411 - 71 - - + + + - - 4 - 0 + 0 0 - - 14 + + Parameters - - false + + + + + ForbiddenCursor + + + false + + + QFrame::NoFrame + + + QFrame::Plain + + + 0 + + + false + + + + + + + + + + + + + 6 - - QFrame::NoFrame + + 0 - - QFrame::Plain + + 0 - + 0 - - false + + 0 - - - - - - - 0 - - - 6 - - - - - Qt::Horizontal - - - QSizePolicy::Expanding - - - - 101 - 27 - - - - - - - - OK - - - true - - - - - - - Cancel - - - - - - - + + + + Qt::Horizontal + + + QSizePolicy::Expanding + + + + 101 + 27 + + + + + + + + OK + + + true + + + + + + + Cancel + + + + + + + + okPB -- 2.39.2