Merge pull request #17081 from endragor/no-press-when-scroll

Make Button not emit press when container is scrolled
This commit is contained in:
Rémi Verschelde
2018-04-10 07:56:37 +02:00
committed by GitHub
5 changed files with 60 additions and 24 deletions

View File

@@ -252,7 +252,7 @@ void BaseButton::_notification(int p_what) {
status.hovering = false;
update();
}
if (p_what == NOTIFICATION_DRAG_BEGIN) {
if (p_what == NOTIFICATION_DRAG_BEGIN || p_what == NOTIFICATION_SCROLL_BEGIN) {
if (status.press_attempt) {
status.press_attempt = false;