Add comment about name being set again in addChild().

This commit is contained in:
Jürg Lehni 2011-11-12 15:50:35 +01:00
parent 2b5cfa401a
commit 07839cf683

View file

@ -822,6 +822,8 @@ var Item = this.Item = Base.extend(/** @lends Item# */{
Base.splice(this._children, [item], index, 0);
item._parent = this;
item._setProject(this._project);
// Setting the name again makes sure all name lookup structures are
// kept in sync.
if (item._name)
item.setName(item._name);
this._changed(Change.HIERARCHY);