| 138 | } |
| 139 | |
| 140 | void |
| 141 | TrackerContext::goToNextKeyFrame(int time) |
| 142 | { |
| 143 | std::list<TrackMarkerPtr > markers; |
| 144 | |
| 145 | getSelectedMarkers(&markers); |
| 146 | |
| 147 | int maximum = INT_MAX; |
| 148 | for (std::list<TrackMarkerPtr > ::iterator it = markers.begin(); it != markers.end(); ++it) { |
| 149 | int t = (*it)->getNextKeyframe(time); |
| 150 | if ( (t != INT_MAX) && (t < maximum) ) { |
| 151 | maximum = t; |
| 152 | } |
| 153 | } |
| 154 | if (maximum != INT_MAX) { |
| 155 | getNode()->getApp()->setLastViewerUsingTimeline( boost::shared_ptr<Node>() ); |
| 156 | getNode()->getApp()->getTimeLine()->seekFrame(maximum, false, NULL, eTimelineChangeReasonPlaybackSeek); |
| 157 | } |
| 158 | } |
| 159 | |
| 160 | TrackMarkerPtr |
| 161 | TrackerContext::getMarkerByName(const std::string & name) const |
no test coverage detected