fix: do mouse gallery navigation on btn release

This commit is contained in:
Gary Wang committed 2021-10-08 19:31:19 +08:00
1 parent 3a442b35f6
commit 7a1816cbac
2 files changed
+15 -11

No files matched your search

+6 -2
View File
@@ -263,9 +263,13 @@ void GraphicsView::mouseMoveEvent(QMouseEvent *event)
void GraphicsView::mouseReleaseEvent(QMouseEvent *event)
{
QGraphicsItem *item = itemAt(event->pos());
if (!item) {
if (event->button() == Qt::ForwardButton || event->button() == Qt::BackButton) {
event->ignore();
} else {
QGraphicsItem *item = itemAt(event->pos());
if (!item) {
event->ignore();
}
}
return QGraphicsView::mouseReleaseEvent(event);