Skip to content

Commit

Permalink
Merge pull request #1889 from srcejon/fix_table_tap_and_hold
Browse files Browse the repository at this point in the history
Prevent popup menu when scrolling tables
  • Loading branch information
f4exb authored Nov 14, 2023
2 parents bdfe1a9 + c27dc71 commit ee07a0d
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions sdrgui/gui/tabletapandhold.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit ee07a0d

Please sign in to comment.