mirror of
https://github.com/jankae/LibreVNA.git
synced 2026-01-20 15:40:38 +01:00
Catch midnight rollover and reschedule replot timer
This commit is contained in:
parent
483c16bcbb
commit
045cf6cc65
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Reference in a new issue