issue #5005, fixed widget visit method

This commit is contained in:
andyque 2014-05-13 14:56:44 +08:00
parent 810c25b85e
commit 1c47c833c6
2 changed files with 4 additions and 3 deletions

View File

@ -122,7 +122,7 @@ void Widget::onExit()
void Widget::visit(Renderer *renderer, const Matrix &parentTransform, bool parentTransformUpdated)
{
if (_enabled)
if (_visible)
{
adaptRenderers();
ProtectedNode::visit(renderer, parentTransform, parentTransformUpdated);

View File

@ -122,11 +122,12 @@ public:
/**
* Sets whether the widget is enabled
*
* true if the widget is enabled, widget may be touched , false if the widget is disabled, widget cannot be touched.
*
* Highest control of widget.
* The default value is true, a widget is default to enabled
*
* @param enabled true if the widget is enabled, widget may be touched and visible, false if the widget is disabled, widget cannot be touched and hidden.
* @param enabled
*/
virtual void setEnabled(bool enabled);