mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-09 18:31:04 +00:00
Update Toc when navigation menu is trigged.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18693 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
30a63bd86f
commit
7350639361
@ -705,6 +705,8 @@ void expandToc(Menu & tomenu, Buffer const * buf)
|
||||
return;
|
||||
}
|
||||
|
||||
const_cast<Buffer*>(buf)->tocBackend().update();
|
||||
|
||||
// Add an entry for the master doc if this is a child doc
|
||||
Buffer const * const master = buf->getMasterBuffer();
|
||||
if (buf != master) {
|
||||
|
@ -889,7 +889,7 @@ void InsetInclude::addToToc(TocList & toclist, Buffer const & buffer, ParConstIt
|
||||
if (!caption.empty()) {
|
||||
Toc & toc = toclist["listing"];
|
||||
docstring const str = convert<docstring>(toc.size() + 1)
|
||||
+ ". " + params_["filename"];
|
||||
+ ". " + from_utf8(caption);
|
||||
// This inset does not have a valid ParConstIterator
|
||||
// so it has to use the iterator of its parent paragraph
|
||||
toc.push_back(TocItem(pit, 0, str));
|
||||
|
@ -830,7 +830,11 @@ string InsetListingsParams::getParamValue(string const & param) const
|
||||
{
|
||||
// is this parameter defined?
|
||||
map<string, string>::const_iterator it = params_.find(param);
|
||||
return (it == params_.end()) ? string() : it->second;
|
||||
string par = (it == params_.end()) ? string() : it->second;
|
||||
if (prefixIs(par, "{") && suffixIs(par, "}"))
|
||||
return par.substr(1, par.size() - 2);
|
||||
else
|
||||
return par;
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user