Skip to content

Commit

Permalink
Signal the scroll once the list is updated in cocos2d::extension::Tab…
Browse files Browse the repository at this point in the history
…leView. (cocos2d#17295)
  • Loading branch information
j-jorge authored and minggo committed Mar 14, 2017
1 parent b842202 commit e0918a8
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions extensions/GUI/CCScrollView/CCTableView.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -481,10 +481,6 @@ void TableView::scrollViewDidScroll(ScrollView* /*view*/)
});
}

if(_tableViewDelegate != nullptr) {
_tableViewDelegate->scrollViewDidScroll(this);
}

ssize_t startIdx = 0, endIdx = 0, idx = 0, maxIdx = 0;
Vec2 offset = this->getContentOffset() * -1;
maxIdx = MAX(countOfItems-1, 0);
Expand Down Expand Up @@ -582,6 +578,10 @@ void TableView::scrollViewDidScroll(ScrollView* /*view*/)
}
this->updateCellAtIndex(i);
}

if(_tableViewDelegate != nullptr) {
_tableViewDelegate->scrollViewDidScroll(this);
}
}

void TableView::onTouchEnded(Touch *pTouch, Event *pEvent)
Expand Down

0 comments on commit e0918a8

Please sign in to comment.