diff --git a/plotview.cpp b/plotview.cpp index b2f8da5..11240a9 100644 --- a/plotview.cpp +++ b/plotview.cpp @@ -169,7 +169,7 @@ void PlotView::paintEvent(QPaintEvent *event) int y = -verticalScrollBar()->value(); \ for (auto&& plot : plots) { \ QRect rect = QRect(0, y, width(), plot->height()); \ - plot->paintFunc(painter, rect, {viewRange.first, viewRange.second});\ + plot->paintFunc(painter, rect, viewRange); \ y += plot->height(); \ } \ } @@ -178,7 +178,7 @@ void PlotView::paintEvent(QPaintEvent *event) PLOT_LAYER(paintMid); PLOT_LAYER(paintFront); if (cursorsEnabled) - cursors.paintFront(painter, rect, {viewRange.first, viewRange.second}); + cursors.paintFront(painter, rect, viewRange); #undef PLOT_LAYER } diff --git a/plotview.h b/plotview.h index ca8d04d..08ec947 100644 --- a/plotview.h +++ b/plotview.h @@ -59,7 +59,7 @@ private: SpectrogramPlot *spectrogramPlot = nullptr; TracePlot *iqPlot = nullptr; std::vector> plots; - std::pair viewRange; + range_t viewRange; bool selection = false; range_t selectedSamples; std::pair selectionFreq;