1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2024-11-10 10:33:29 -05:00

Merge pull request #1889 from srcejon/fix_table_tap_and_hold

Prevent popup menu when scrolling tables
This commit is contained in:
Edouard Griffiths 2023-11-14 23:13:41 +01:00 committed by GitHub
commit ee07a0d5f4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

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