From 9fc6177570ba9315bff33ac37beb9965d1e3ac9e Mon Sep 17 00:00:00 2001 From: "Huabing.Xu" Date: Fri, 7 Mar 2014 10:03:34 +0800 Subject: [PATCH] fix bug for outdated transform status --- cocos/2d/CCNode.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/cocos/2d/CCNode.cpp b/cocos/2d/CCNode.cpp index cc2617c35f..696d37aab8 100644 --- a/cocos/2d/CCNode.cpp +++ b/cocos/2d/CCNode.cpp @@ -506,7 +506,11 @@ bool Node::isVisible() const /// isVisible setter void Node::setVisible(bool var) { - _visible = var; + if(var != _visible) + { + _visible = var; + if(_visible) _transformUpdated = _transformDirty = _inverseDirty = true; + } } const Point& Node::getAnchorPointInPoints() const