| 137 | } |
| 138 | |
| 139 | void |
| 140 | TrackerContext::goToPreviousKeyFrame(int time) |
| 141 | { |
| 142 | std::list<TrackMarkerPtr> markers; |
| 143 | |
| 144 | getSelectedMarkers(&markers); |
| 145 | |
| 146 | int minimum = std::numeric_limits<int>::min(); |
| 147 | for (std::list<TrackMarkerPtr> ::iterator it = markers.begin(); it != markers.end(); ++it) { |
| 148 | int t = (*it)->getPreviousKeyframe(time); |
| 149 | if ( (t != std::numeric_limits<int>::min()) && (t > minimum) ) { |
| 150 | minimum = t; |
| 151 | } |
| 152 | } |
| 153 | if (minimum != std::numeric_limits<int>::min()) { |
| 154 | getNode()->getApp()->setLastViewerUsingTimeline( NodePtr() ); |
| 155 | getNode()->getApp()->getTimeLine()->seekFrame(minimum, false, NULL, eTimelineChangeReasonPlaybackSeek); |
| 156 | } |
| 157 | } |
| 158 | |
| 159 | void |
| 160 | TrackerContext::goToNextKeyFrame(int time) |
no test coverage detected