aboutsummaryrefslogtreecommitdiffstats
path: root/ui/qt/rtp_player_dialog.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'ui/qt/rtp_player_dialog.cpp')
-rw-r--r--ui/qt/rtp_player_dialog.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/ui/qt/rtp_player_dialog.cpp b/ui/qt/rtp_player_dialog.cpp
index 8118dd8286..4d6f2c65c1 100644
--- a/ui/qt/rtp_player_dialog.cpp
+++ b/ui/qt/rtp_player_dialog.cpp
@@ -663,14 +663,13 @@ void RtpPlayerDialog::updateHintLabel()
void RtpPlayerDialog::resetXAxis()
{
QCustomPlot *ap = ui->audioPlot;
- QCPRange x_range = ap->xAxis->range();
double pixel_pad = 10.0; // per side
ap->rescaleAxes(true);
double axis_pixels = ap->xAxis->axisRect()->width();
- ap->xAxis->scaleRange((axis_pixels + (pixel_pad * 2)) / axis_pixels, x_range.center());
+ ap->xAxis->scaleRange((axis_pixels + (pixel_pad * 2)) / axis_pixels, ap->xAxis->range().center());
axis_pixels = ap->yAxis->axisRect()->height();
ap->yAxis->scaleRange((axis_pixels + (pixel_pad * 2)) / axis_pixels, ap->yAxis->range().center());