fix _renderFlags after scene restored (#3193)

This commit is contained in:
Jare Guo
2018-09-05 10:29:13 +08:00
committed by pandamicro
parent f1c49a59f8
commit 6dbcfe67a0
+5 -1
View File
@@ -2978,7 +2978,7 @@ var Node = cc.Class({
}
},
_restoreProperties () {
_restoreProperties: CC_EDITOR && function () {
/*
* TODO: Refine this code after completing undo/redo 2.0.
* The node will be destroyed when deleting in the editor,
@@ -3004,6 +3004,10 @@ var Node = cc.Class({
this._renderComponent.disableRender();
}
}
if (this._children.length > 0) {
this._renderFlag |= RenderFlow.FLAG_CHILDREN;
}
},
onRestore: CC_EDITOR && function () {