mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-28 06:49:43 +00:00
revert 23410 and fix InsetLabel::update() instead. It seems that the const_iterator used in InsetLabel::update() did not please gcc.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23411 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
6f455a916b
commit
34d15c9150
@ -69,9 +69,9 @@ void InsetLabel::update(docstring const & new_label, bool updaterefs)
|
||||
setParam("name", label);
|
||||
|
||||
if (updaterefs) {
|
||||
Buffer::References const & refs = buffer().references(old_label);
|
||||
Buffer::References::const_iterator it = refs.begin();
|
||||
Buffer::References::const_iterator end = refs.end();
|
||||
Buffer::References & refs = buffer().references(old_label);
|
||||
Buffer::References::iterator it = refs.begin();
|
||||
Buffer::References::iterator end = refs.end();
|
||||
for (; it != end; ++it)
|
||||
it->first->setParam("reference", label);
|
||||
}
|
||||
@ -145,11 +145,7 @@ void InsetLabel::doDispatch(Cursor & cur, FuncRequest & cmd)
|
||||
cur.noUpdate();
|
||||
break;
|
||||
}
|
||||
docstring old_name = params()["name"];
|
||||
update(p["name"]);
|
||||
if (params()["name"] != old_name)
|
||||
cur.bv().buffer().changeRefsIfUnique(old_name,
|
||||
params()["name"], REF_CODE);
|
||||
break;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user