mirror of https://github.com/axmolengine/axmol.git
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:
commit
0d77485b3b
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue