diff --git a/src/frontends/qt4/Menus.cpp b/src/frontends/qt4/Menus.cpp index 81fbc32529..4e7a807d9b 100644 --- a/src/frontends/qt4/Menus.cpp +++ b/src/frontends/qt4/Menus.cpp @@ -953,12 +953,6 @@ void MenuDefinition::expandToc(Buffer const * buf) if (cit->first == "tableofcontents") continue; - if (cit->first == "listing") { - // FIXME: the listing navigate menu causes a crash for unknown - // reason. See http://bugzilla.lyx.org/show_bug.cgi?id=4613 - continue; - } - MenuDefinition submenu; if (cit->second.size() >= 30) { FuncRequest f(LFUN_DIALOG_SHOW, "toc " + cit->first); diff --git a/src/insets/InsetInclude.cpp b/src/insets/InsetInclude.cpp index c5c67f04ab..8784882628 100644 --- a/src/insets/InsetInclude.cpp +++ b/src/insets/InsetInclude.cpp @@ -896,7 +896,6 @@ void InsetInclude::addToToc(DocIterator const & cpit) docstring str = convert(toc.size() + 1) + ". " + from_utf8(caption); DocIterator pit = cpit; - pit.push_back(CursorSlice(*this)); toc.push_back(TocItem(pit, 0, str)); return; } @@ -937,9 +936,10 @@ void InsetInclude::updateLabels(ParIterator const & it) listings_label_.clear(); return; } - Counters & counters = buffer().params().documentClass().counters(); + Buffer const & master = *buffer().masterBuffer(); + Counters & counters = master.params().documentClass().counters(); docstring const cnt = from_ascii("listing"); - listings_label_ = buffer().B_("Program Listing"); + listings_label_ = master.B_("Program Listing"); if (counters.hasCounter(cnt)) { counters.step(cnt); listings_label_ += " " + convert(counters.value(cnt));