mirror of
https://github.com/cocos/cocos4.git
synced 2026-12-03 09:32:38 +08:00
Merge pull request #2641 from VisualSJ/v1.9-abc
`active` must synchronize to component
This commit is contained in:
@@ -2505,6 +2505,15 @@ var Node = cc.Class({
|
||||
_removeSgNode: SgHelper.removeSgNode,
|
||||
|
||||
onRestore: CC_EDITOR && function () {
|
||||
// update dummy sgNode of components
|
||||
for (var i=0; i<this._components.length; i++) {
|
||||
var comp = this._components[i];
|
||||
if (!comp || !comp._sgNode) {
|
||||
continue;
|
||||
}
|
||||
comp._sgNode.visible = comp.enabledInHierarchy;
|
||||
}
|
||||
|
||||
this._updateDummySgNode();
|
||||
|
||||
var sizeProvider = this._sizeProvider;
|
||||
|
||||
Reference in New Issue
Block a user