fixed switch scene (#2791)

This commit is contained in:
yinkaile
2018-06-01 15:35:00 +08:00
committed by pandamicro
parent d5fe261cef
commit 7fe2eab497
+9 -3
View File
@@ -2932,9 +2932,7 @@ var Node = cc.Class({
}
},
onRestore: CC_EDITOR && function () {
this._onRestoreBase();
_restoreProperties () {
/*
* TODO: Refine this code after completing undo/redo 2.0.
* The node will be destroyed when deleting in the editor,
@@ -2947,10 +2945,18 @@ var Node = cc.Class({
this._worldMatrix = mathPools.mat4.get();
}
this._localMatDirty = this._worldMatDirty = true;
this._renderFlag |= RenderFlow.FLAG_TRANSFORM;
if (this._renderComponent) {
this._renderFlag |= RenderFlow.FLAG_COLOR;
}
},
onRestore: CC_EDITOR && function () {
this._onRestoreBase();
this._restoreProperties();
var actionManager = cc.director.getActionManager();
if (this._activeInHierarchy) {