the video slider can no longer return values outside its range and is initialize to 0-1, pos 0

Originally committed to SVN as r77.
This commit is contained in:
Fredrik Mellbin 2006-02-19 14:19:26 +00:00
parent fd0cd9c045
commit 38f62c6906
1 changed files with 4 additions and 0 deletions

View File

@ -55,6 +55,7 @@ VideoSlider::VideoSlider (wxWindow* parent, wxWindowID id)
Display = NULL; Display = NULL;
SetClientSize(20,25); SetClientSize(20,25);
locked = false; locked = false;
SetRange(0,1);
} }
@ -80,9 +81,12 @@ void VideoSlider::SetValue(int value) {
///////////// /////////////
// Set range // Set range
void VideoSlider::SetRange(int from,int to) { void VideoSlider::SetRange(int from,int to) {
wxASSERT(from <= to);
locked = false; locked = false;
min = from; min = from;
max = to; max = to;
val = from;
UpdateImage(); UpdateImage();
} }