Merge pull request #7560 from Mazyod/fix-tableview-touch-handler

FIX: make sure TableView parents are visible before handling touch
This commit is contained in:
minggo 2014-07-23 18:32:30 +08:00
commit 0d77485b3b
1 changed files with 5 additions and 2 deletions

View File

@ -591,9 +591,12 @@ void TableView::onTouchEnded(Touch *pTouch, Event *pEvent)
bool TableView::onTouchBegan(Touch *pTouch, Event *pEvent)
{
if (!this->isVisible())
for (Node *c = this; c != nullptr; c = c->getParent())
{
return false;
if (!c->isVisible())
{
return false;
}
}
bool touchResult = ScrollView::onTouchBegan(pTouch, pEvent);