diff --git a/src/item/Item.js b/src/item/Item.js index 6ff1a4e1..e69d2b3c 100644 --- a/src/item/Item.js +++ b/src/item/Item.js @@ -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);