Merge pull request #12711 from yangws/issue_12626

Fix bug taken from pr12602: scroll view can't scroll if pressed the b…
This commit is contained in:
子龙山人 2015-07-07 13:33:24 +08:00
commit cdaa994b84
1 changed files with 4 additions and 0 deletions

View File

@ -783,7 +783,9 @@ void Widget::propagateTouchEvent(cocos2d::ui::Widget::TouchEventType event, coco
Widget* widgetParent = getWidgetParent();
if (widgetParent)
{
widgetParent->_hittedByCamera = _hittedByCamera;
widgetParent->interceptTouchEvent(event, sender, touch);
widgetParent->_hittedByCamera = nullptr;
}
}
@ -974,7 +976,9 @@ void Widget::interceptTouchEvent(cocos2d::ui::Widget::TouchEventType event, coco
Widget* widgetParent = getWidgetParent();
if (widgetParent)
{
widgetParent->_hittedByCamera = _hittedByCamera;
widgetParent->interceptTouchEvent(event,sender,touch);
widgetParent->_hittedByCamera = nullptr;
}
}