mirror of
https://github.com/cocos/cocos4.git
synced 2026-12-03 01:12:42 +08:00
Merge pull request #1067 from natural-law/issue4088
Solve the error when delete TiledMap node & undo the delete action.
This commit is contained in:
@@ -751,6 +751,9 @@ var TiledMap = cc.Class({
|
||||
|
||||
var ret = sgNode.initWithXML(file.tmxXmlStr, resPath);
|
||||
if (ret) {
|
||||
// Asset is changed, the layers are recreated.
|
||||
// The layers of pre asset should be cleaned.
|
||||
self._detachedLayers.length = 0;
|
||||
self._onMapLoaded();
|
||||
}
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user