From 0d74131edd6afe311a6a73cd458956059763a99e Mon Sep 17 00:00:00 2001 From: Anton Lashkov Date: Sat, 29 Aug 2015 11:24:51 +0400 Subject: [PATCH] SpeedPlotView: fix render graphs with zero speed --- src/gui/properties/speedplotview.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/properties/speedplotview.cpp b/src/gui/properties/speedplotview.cpp index 8b2dc956d..059908e95 100644 --- a/src/gui/properties/speedplotview.cpp +++ b/src/gui/properties/speedplotview.cpp @@ -194,7 +194,7 @@ void SpeedPlotView::paintEvent(QPaintEvent *) // draw graphs rect.adjust(3, 0, 0, 0); // Need, else graphs cross left gridline - double y_multiplier = rect.height() / max_y; + double y_multiplier = (max_y == 0.0) ? 0.0 : rect.height() / max_y; double x_tick_size = double(rect.width()) / m_viewablePointsCount; for (QMap >::const_iterator it = m_yData.begin(); it != m_yData.end(); ++it) {