Merge pull request #1889 from srcejon/fix_table_tap_and_hold

Prevent popup menu when scrolling tables
pull/1892/head
Edouard Griffiths 2023-11-14 23:13:41 +01:00 zatwierdzone przez GitHub
commit ee07a0d5f4
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
1 zmienionych plików z 6 dodań i 2 usunięć

Wyświetl plik

@ -48,8 +48,12 @@ bool TableTapAndHold::eventFilter(QObject *obj, QEvent *event)
if (vHeader) {
point.setX(point.x() - vHeader->width());
}
emit tapAndHold(point);
return true;
QSize size = m_table->viewport()->size();
if ((point.x() >= 0) && (point.x() < size.width()) && (point.y() >= 0) && (point.y() < size.height()))
{
emit tapAndHold(point);
return true;
}
}
}
return QObject::eventFilter(obj, event);