mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-23 05:25:26 +00:00
- Fix crash with clicking on second Listings iten in Navigator (in EmbeddedObject.lyx).
- Fix http://bugzilla.lyx.org/show_bug.cgi?id=4613 git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@24869 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
641ae02e37
commit
034cccd008
@ -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);
|
||||
|
@ -896,7 +896,6 @@ void InsetInclude::addToToc(DocIterator const & cpit)
|
||||
docstring str = convert<docstring>(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<docstring>(counters.value(cnt));
|
||||
|
Loading…
Reference in New Issue
Block a user