| 1589 | } |
| 1590 | |
| 1591 | void |
| 1592 | GuiAppInstance::goToPreviousKeyframe() |
| 1593 | { |
| 1594 | ///runs only in the main thread |
| 1595 | assert( QThread::currentThread() == qApp->thread() ); |
| 1596 | |
| 1597 | _imp->timelineKeyframes.sort(); |
| 1598 | TimeLinePtr timeline = getProject()->getTimeLine(); |
| 1599 | SequenceTime currentFrame = timeline->currentFrame(); |
| 1600 | std::list<SequenceTime>::iterator lowerBound = std::lower_bound(_imp->timelineKeyframes.begin(), _imp->timelineKeyframes.end(), currentFrame); |
| 1601 | if ( lowerBound != _imp->timelineKeyframes.begin() ) { |
| 1602 | --lowerBound; |
| 1603 | timeline->seekFrame(*lowerBound, true, NULL, eTimelineChangeReasonPlaybackSeek); |
| 1604 | } |
| 1605 | } |
| 1606 | |
| 1607 | void |
| 1608 | GuiAppInstance::goToNextKeyframe() |
no test coverage detected