[FIX]: make sure parent is visible before handling touch

This commit is contained in:
Mazyad Alabduljaleel 2014-07-23 03:42:29 +04:00
parent 6d8c1cd4f1
commit f19acbb6db
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);