diff --git a/extensions/GUI/CCScrollView/CCScrollView.cpp b/extensions/GUI/CCScrollView/CCScrollView.cpp index da6de500af..e763bf7489 100644 --- a/extensions/GUI/CCScrollView/CCScrollView.cpp +++ b/extensions/GUI/CCScrollView/CCScrollView.cpp @@ -565,9 +565,9 @@ void ScrollView::onAfterDraw() void ScrollView::visit(Renderer *renderer, const Mat4 &parentTransform, uint32_t parentFlags) { // quick return if not visible - if (!isVisible()) + if (!isVisible()) { - return; + return; } uint32_t flags = processParentFlags(parentTransform, parentFlags); @@ -583,23 +583,23 @@ void ScrollView::visit(Renderer *renderer, const Mat4 &parentTransform, uint32_t this->beforeDraw(); bool visibleByCamera = isVisitableByVisitingCamera(); - if (!_children.empty()) + if (!_children.empty()) { - int i=0; + int i=0; // draw children zOrder < 0 - for( ; i < _children.size(); i++ ) + for( ; i < _children.size(); i++ ) { - Node *child = _children.at(i); - if ( child->getLocalZOrder() < 0 ) + Node *child = _children.at(i); + if ( child->getLocalZOrder() < 0 ) { - child->visit(renderer, _modelViewTransform, flags); - } + child->visit(renderer, _modelViewTransform, flags); + } else { - break; + break; } - } + } // this draw if (visibleByCamera) @@ -619,7 +619,7 @@ void ScrollView::visit(Renderer *renderer, const Mat4 &parentTransform, uint32_t this->afterDraw(); - director->popMatrix(MATRIX_STACK_TYPE::MATRIX_STACK_MODELVIEW); + director->popMatrix(MATRIX_STACK_TYPE::MATRIX_STACK_MODELVIEW); } bool ScrollView::onTouchBegan(Touch* touch, Event* event)