From 6dbcfe67a0a41ecd6b44e9127ec8ea6a3d9e6761 Mon Sep 17 00:00:00 2001 From: Jare Guo Date: Wed, 5 Sep 2018 10:29:13 +0800 Subject: [PATCH] fix _renderFlags after scene restored (#3193) --- cocos2d/core/CCNode.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/cocos2d/core/CCNode.js b/cocos2d/core/CCNode.js index c56bdd91ea..e0aeaa1b4f 100644 --- a/cocos2d/core/CCNode.js +++ b/cocos2d/core/CCNode.js @@ -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 () {