aboutsummaryrefslogtreecommitdiffstats
path: root/stats
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2021-01-19 15:46:48 -0800
committerGravatar bstoeger <32835590+bstoeger@users.noreply.github.com>2021-01-20 08:47:18 +0100
commit29060feaa80ba85c7337a6661a7cacc929b1b934 (patch)
tree41e28a8d15d98deaab5d2be4b0134e7e5a5853f5 /stats
parent4f58e9aa62d29a31ff8df74bea75cb770a0d50ff (diff)
downloadsubsurface-29060feaa80ba85c7337a6661a7cacc929b1b934.tar.gz
statistics/legend: fix dragging legend on touch screen
While this didn't appear to be needed when dragging the legend with a mouse, on a touch screen for some reason the drag ended after 30 pixels either way horizontally (but no apparent limit vertically). By setting this flag to true, drags on a tablet appear to work as expected. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'stats')
-rw-r--r--stats/statsview.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/stats/statsview.cpp b/stats/statsview.cpp
index feb5a276e..6560360cc 100644
--- a/stats/statsview.cpp
+++ b/stats/statsview.cpp
@@ -68,6 +68,7 @@ void StatsView::mousePressEvent(QMouseEvent *event)
dragStartItem = rect.topLeft();
draggedItem = &*legend;
grabMouse();
+ setKeepMouseGrab(true); // don't allow Qt to steal the grab
}
}
}