Sweep indicator on graphs

This commit is contained in:
Jan Käberich 2022-10-29 21:19:30 +02:00
parent 1fcf25d060
commit 6f0fb5430d
11 changed files with 370 additions and 55 deletions

View file

@ -168,6 +168,18 @@ void TracePlot::paintEvent(QPaintEvent *event)
traceRemovalPending = false;
}
xSweep = std::numeric_limits<double>::quiet_NaN();
for(auto t : traces) {
if(!t.second) {
continue;
}
Trace* tr = t.first;
if(tr->getSource() == Trace::Source::Live && tr->isVisible() && !tr->isPaused()) {
xSweep = model.getSweepPosition();
break;
}
}
Q_UNUSED(event)
auto& pref = Preferences::getInstance();
QPainter p(this);