add subtitle track when switching to add tool

Fixes #1709
This commit is contained in:
itsmattkc
2021-09-03 17:02:09 -07:00
parent 90af822bf0
commit 3fccfecd7e
5 changed files with 101 additions and 12 deletions
+4
View File
@@ -98,6 +98,10 @@ void AddTool::MouseRelease(TimelineViewMouseEvent *event)
if (!ghost_->GetAdjustedLength().isNull()) {
MultiUndoCommand* command = new MultiUndoCommand();
if (MultiUndoCommand *subtitle_section_command = parent()->TakeSubtitleSectionCommand()) {
command->add_child(subtitle_section_command);
}
ClipBlock* clip;
if (Core::instance()->GetSelectedAddableObject() == olive::Tool::kAddableSubtitle) {
clip = new SubtitleBlock();