mirror of
https://github.com/miek/inspectrum.git
synced 2026-03-03 06:54:17 +01:00
Switch plotview to QGraphicsView for canvas dragging
This commit is contained in:
@@ -36,6 +36,7 @@
|
||||
PlotView::PlotView(InputSource *input) : cursors(this), viewRange({0, 0})
|
||||
{
|
||||
mainSampleSource = input;
|
||||
setDragMode(QGraphicsView::ScrollHandDrag);
|
||||
setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOn);
|
||||
setMouseTracking(true);
|
||||
enableCursors(false);
|
||||
@@ -193,7 +194,7 @@ bool PlotView::viewportEvent(QEvent *event) {
|
||||
}
|
||||
|
||||
// Handle parent eveents
|
||||
QAbstractScrollArea::viewportEvent(event);
|
||||
QGraphicsView::viewportEvent(event);
|
||||
|
||||
// Pass mouse events to individual plot objects
|
||||
if (event->type() == QEvent::MouseButtonPress ||
|
||||
|
||||
Reference in New Issue
Block a user