diff --git a/plotview.cpp b/plotview.cpp index ae265b4..85b0e3d 100644 --- a/plotview.cpp +++ b/plotview.cpp @@ -495,7 +495,7 @@ void PlotView::resizeEvent(QResizeEvent * event) updateView(); } -off_t PlotView::samplesPerLine() +off_t PlotView::samplesPerColumn() { return fftSize / zoomLevel; } @@ -560,10 +560,10 @@ void PlotView::enableScales(bool enabled) int PlotView::sampleToColumn(off_t sample) { - return sample / samplesPerLine(); + return sample / samplesPerColumn(); } off_t PlotView::columnToSample(int col) { - return col * samplesPerLine(); + return col * samplesPerColumn(); } diff --git a/plotview.h b/plotview.h index 74b9acf..7ff969f 100644 --- a/plotview.h +++ b/plotview.h @@ -85,7 +85,7 @@ private: void exportSamples(std::shared_ptr src); template void exportSamples(std::shared_ptr src); int plotsHeight(); - off_t samplesPerLine(); + off_t samplesPerColumn(); void updateViewRange(bool reCenter); void updateView(bool reCenter = false); void paintTimeScale(QPainter &painter, QRect &rect, range_t sampleRange);