NextFrame and PrevFrame no longer requests out of range frames

Originally committed to SVN as r78.
This commit is contained in:
Fredrik Mellbin 2006-02-19 14:28:03 +00:00
parent 38f62c6906
commit e080a06834
1 changed files with 8 additions and 2 deletions

View File

@ -125,7 +125,10 @@ int VideoSlider::GetXAtValue(int value) {
// Next frame hotkey
void VideoSlider::NextFrame() {
if (Display->IsPlaying) return;
Display->JumpToFrame(GetValue()+1);
//don't request out of range frames
if (GetValue() < max)
Display->JumpToFrame(GetValue()+1);
}
@ -133,7 +136,10 @@ void VideoSlider::NextFrame() {
// Previous frame hotkey
void VideoSlider::PrevFrame() {
if (Display->IsPlaying) return;
Display->JumpToFrame(GetValue()-1);
//don't request out of range frames
if (GetValue() > min)
Display->JumpToFrame(GetValue()-1);
}