MCPcopy Create free account
hub / github.com/IENT/YUView / setCurrentFrameAndUpdate

Method setCurrentFrameAndUpdate

YUViewLib/src/ui/PlaybackController.cpp:651–671  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

649}
650
651bool PlaybackController::setCurrentFrameAndUpdate(int frame, bool updateView)
652{
653 if (frame == this->currentFrameIdx)
654 return false;
655 if (!this->anyItemIndexedByFrame())
656 return false;
657
658 DEBUG_PLAYBACK("PlaybackController::setCurrentFrameAndUpdate %d", frame);
659
660 this->updateFrameSliderAndSpinBoxWithoutSignals(frame);
661 this->currentFrameIdx = frame;
662
663 if (updateView)
664 {
665 // Also update the view to display the new frame
666 this->splitViewPrimary->update(true);
667 this->splitViewSeparate->update();
668 return true;
669 }
670 return false;
671}
672
673void PlaybackController::updateFrameSliderAndSpinBoxWithoutSignals(
674 const int value, const std::optional<int> sliderMaximum)

Callers 11

on_stopButton_clickedMethod · 0.95
nextFrameMethod · 0.95
previousFrameMethod · 0.95
goToNextItemMethod · 0.95
goToNextFrameMethod · 0.95
loadViewStateMethod · 0.80
loadPlaylistMethod · 0.80

Calls 3

anyItemIndexedByFrameMethod · 0.95
updateMethod · 0.45

Tested by

no test coverage detected