Skip to content

Commit

Permalink
Video up and Audio down use same logic
Browse files Browse the repository at this point in the history
Signed-off-by: Thomas Wilshaw <thomaswilshaw@gmail.com>
  • Loading branch information
ThomasWilshaw committed Dec 2, 2024
1 parent 0d5a0a5 commit f52b918
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions timeline.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1566,8 +1566,11 @@ void DrawTimeline(otio::Timeline* timeline) {
}
}
}
// Up Arrow
if (ImGui::IsKeyPressed(ImGuiKey::ImGuiKey_UpArrow)) {
// Up arrow for Video tracks and down arrow for Audio tracks use the same logic
auto parent = dynamic_cast<otio::Composable*>(appState.selected_object)->parent();
auto selected_track = dynamic_cast<otio::Track*>(parent);
if ((ImGui::IsKeyPressed(ImGuiKey::ImGuiKey_UpArrow) && selected_track->kind() == "Video") ||
(ImGui::IsKeyPressed(ImGuiKey::ImGuiKey_DownArrow) && selected_track->kind() == "Audio")) {
std::string selected_type = appState.selected_object->schema_name();
if (selected_type == "Clip" || selected_type == "Gap" || selected_type == "Transition") {
// Finding start time varies depending on object type
Expand Down

0 comments on commit f52b918

Please sign in to comment.