| 118 | } |
| 119 | |
| 120 | void |
| 121 | TrackerContext::goToPreviousKeyFrame(int time) |
| 122 | { |
| 123 | std::list<TrackMarkerPtr > markers; |
| 124 | |
| 125 | getSelectedMarkers(&markers); |
| 126 | |
| 127 | int minimum = INT_MIN; |
| 128 | for (std::list<TrackMarkerPtr > ::iterator it = markers.begin(); it != markers.end(); ++it) { |
| 129 | int t = (*it)->getPreviousKeyframe(time); |
| 130 | if ( (t != INT_MIN) && (t > minimum) ) { |
| 131 | minimum = t; |
| 132 | } |
| 133 | } |
| 134 | if (minimum != INT_MIN) { |
| 135 | getNode()->getApp()->setLastViewerUsingTimeline( boost::shared_ptr<Node>() ); |
| 136 | getNode()->getApp()->getTimeLine()->seekFrame(minimum, false, NULL, eTimelineChangeReasonPlaybackSeek); |
| 137 | } |
| 138 | } |
| 139 | |
| 140 | void |
| 141 | TrackerContext::goToNextKeyFrame(int time) |
no test coverage detected