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>
This commit is contained in:
Dirk Hohndel 2021-01-19 15:46:48 -08:00 committed by bstoeger
parent 4f58e9aa62
commit 29060feaa8

View file

@ -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
}
}
}