timebasedwidget: implemented go to in/out

This commit is contained in:
itsmattkc
2020-04-17 00:20:16 +10:00
parent a93b06b7a2
commit a5c1de6df3
5 changed files with 44 additions and 0 deletions
+22
View File
@@ -462,4 +462,26 @@ void TimeBasedWidget::ToggleShowAll()
}
}
void TimeBasedWidget::GoToIn()
{
if (viewer_node_) {
if (points_ && points_->workarea()->enabled()) {
SetTimeAndSignal(Timecode::time_to_timestamp(points_->workarea()->in(), timebase()));
} else {
GoToStart();
}
}
}
void TimeBasedWidget::GoToOut()
{
if (viewer_node_) {
if (points_ && points_->workarea()->enabled()) {
SetTimeAndSignal(Timecode::time_to_timestamp(points_->workarea()->out(), timebase()));
} else {
GoToEnd();
}
}
}
OLIVE_NAMESPACE_EXIT