mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-08-14 02:27:09 -07:00
SpeedPlotView: fix render graphs with zero speed
This commit is contained in:
parent
632cba8b30
commit
0d74131edd
1 changed files with 1 additions and 1 deletions
|
@ -194,7 +194,7 @@ void SpeedPlotView::paintEvent(QPaintEvent *)
|
||||||
// draw graphs
|
// draw graphs
|
||||||
rect.adjust(3, 0, 0, 0); // Need, else graphs cross left gridline
|
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;
|
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) {
|
for (QMap<GraphID, QQueue<double> >::const_iterator it = m_yData.begin(); it != m_yData.end(); ++it) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue