1
0
mirror of https://github.com/d47081/qBittorrent.git synced 2025-01-10 23:07:59 +00:00

Merge pull request #3701 from onto/master

SpeedPlotView: fix render graphs with zero speed
This commit is contained in:
sledgehammer999 2015-08-29 07:28:02 -05:00
commit ddd6533812

View File

@ -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<GraphID, QQueue<double> >::const_iterator it = m_yData.begin(); it != m_yData.end(); ++it) {