should not disable widget if it is not a child of current editing animation

This commit is contained in:
Jare Guo
2016-07-18 21:23:55 +08:00
parent d509433093
commit dc6ceeecf4
+2 -1
View File
@@ -183,11 +183,12 @@ function refreshScene () {
} else {
var i, node, nodes = widgetManager._nodesWithWidget, len = nodes.length;
if (CC_EDITOR && _Scene.AnimUtils.curAnimState) {
var editingNode = _Scene.AnimUtils.curRootNode;
// always check isAlignOnce because animation mode maybe changed
for (i = len - 1; i >= 0; i--) {
node = nodes[i];
var widget = node._widget;
if (widget.isAlignOnce) {
if (widget.isAlignOnce && node.isChildOf(editingNode)) {
// widget contains in _nodesWithWidget should aligned at least once
widget.enabled = false;
}