Skip to content

Commit

Permalink
minor timeline fix, do not trigger anything after reaching end
Browse files Browse the repository at this point in the history
  • Loading branch information
underdoeg committed Jul 18, 2014
1 parent 990f539 commit fd7fbd0
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/Animation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ void Timeline::setTime(unsigned long long t) {
Timeline* _this = this;
stop();
ofNotifyEvent(ended, _this);
return;
}
}

Expand Down Expand Up @@ -126,13 +127,16 @@ void Timeline::replay() {
void Timeline::stop() {
isPlaying = false;
timeOld = 0;
timeOffset = ofGetElapsedTimeMillis();
//timeOffset = ofGetElapsedTimeMillis();
for(Animation_* animation: animations) {
animation->reset();
}
for(Timeline* child: children) {
child->stop();
}

//markerQueue.clear();

while(markerQueue.size() > 0) {
markerTriggered(markerQueue.front());
markerQueue.pop_front();
Expand Down

0 comments on commit fd7fbd0

Please # to comment.