timeline: handle users deleting tentative subtitle track

Fixes potential crash if users try to do this
This commit is contained in:
itsmattkc
2022-05-11 13:47:12 -07:00
parent 78d5314c0a
commit f17c119c29
6 changed files with 85 additions and 31 deletions
@@ -121,9 +121,13 @@ void TrackView::TrackHeightChanged(int index, int height)
void TrackView::InsertTrack(Track *track)
{
TrackViewItem *tvi = new TrackViewItem(track);
connect(tvi, &TrackViewItem::AboutToDeleteTrack, this, &TrackView::AboutToDeleteTrack);
splitter_->Insert(track->Index(),
track->GetTrackHeightInPixels(),
new TrackViewItem(track));
tvi);
}
void TrackView::RemoveTrack(Track *track)