diff --git a/plotview.cpp b/plotview.cpp index 6ae5e85..a653d0b 100644 --- a/plotview.cpp +++ b/plotview.cpp @@ -388,6 +388,9 @@ void PlotView::paintTimeScale(QPainter &painter, QRect &rect, range_t sam float stopTime = (float)sampleRange.maximum / sampleRate; float duration = stopTime - startTime; + if (duration <= 0) + return; + painter.save(); QPen pen(Qt::white, 1, Qt::SolidLine);