From 045cf6cc65a2a1fd27bf939791c803d882b8dfc0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20K=C3=A4berich?= Date: Thu, 16 Feb 2023 00:01:13 +0100 Subject: [PATCH] Catch midnight rollover and reschedule replot timer --- Software/PC_Application/LibreVNA-GUI/Traces/traceplot.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Software/PC_Application/LibreVNA-GUI/Traces/traceplot.cpp b/Software/PC_Application/LibreVNA-GUI/Traces/traceplot.cpp index 231db7a..bf5ef68 100644 --- a/Software/PC_Application/LibreVNA-GUI/Traces/traceplot.cpp +++ b/Software/PC_Application/LibreVNA-GUI/Traces/traceplot.cpp @@ -571,7 +571,8 @@ void TracePlot::traceDeleted(Trace *t) void TracePlot::triggerReplot() { auto now = QTime::currentTime(); - if (lastUpdate.msecsTo(now) >= MinUpdateInterval) { + if (lastUpdate.msecsTo(now) >= MinUpdateInterval // last update was a sufficiently long time ago + || lastUpdate.msecsTo(now) < 0) { // or the time rolled over at midnight lastUpdate = now; replot(); } else {