MCPcopy Create free account
hub / github.com/Serial-Studio/Serial-Studio / previousFrame

Method previousFrame

app/src/MDF4/Player.cpp:539–559  ·  view source on GitHub ↗

* @brief Steps back to the previous frame */

Source from the content-addressed store, hash-verified

537 * @brief Steps back to the previous frame
538 */
539void MDF4::Player::previousFrame()
540{
541 if (!isOpen())
542 return;
543
544 if (isPlaying())
545 pause();
546
547 if (m_framePos > 0) {
548 --m_framePos;
549
550 UI::Dashboard::instance().clearPlotData();
551
552 int framesToLoad = UI::Dashboard::instance().points();
553 int startFrame = std::max(0, m_framePos - framesToLoad);
554 int endFrame = std::min(frameCount() - 1, m_framePos);
555
556 processFrameBatch(startFrame, endFrame);
557 updateData();
558 }
559}
560
561//--------------------------------------------------------------------------------------------------
562// Progress & seeking

Callers

nothing calls this directly

Calls 2

clearPlotDataMethod · 0.80
pointsMethod · 0.45

Tested by

no test coverage detected