diff options
| author | Carl Hetherington <cth@carlh.net> | 2015-03-24 23:30:08 +0000 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2015-03-24 23:30:08 +0000 |
| commit | 86aaba4f392c35ccf28221049f87b8cdba868777 (patch) | |
| tree | 9809348c4b13f1f8a0d1f3701f829cda50b98db5 /src/wx/timeline.cc | |
| parent | 11d68f1cda11ecf5983451c10a73a37692b025bb (diff) | |
Hand-apply a2f81da6d9afc5d3b5e647e1e05ca5d4507af42c from master;
allow "deletion" of the audio part of a FFmpeg file from the
timeline; delete unmaps the audio (#316).
Diffstat (limited to 'src/wx/timeline.cc')
| -rw-r--r-- | src/wx/timeline.cc | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/src/wx/timeline.cc b/src/wx/timeline.cc index 6ed91e098..2c032b8d3 100644 --- a/src/wx/timeline.cc +++ b/src/wx/timeline.cc @@ -93,7 +93,12 @@ void Timeline::playlist_changed () { ensure_ui_thread (); - + recreate_views (); +} + +void +Timeline::recreate_views () +{ shared_ptr<const Film> fl = _film.lock (); if (!fl) { return; @@ -108,7 +113,9 @@ Timeline::playlist_changed () if (dynamic_pointer_cast<VideoContent> (*i)) { _views.push_back (shared_ptr<TimelineView> (new TimelineVideoContentView (*this, *i))); } - if (dynamic_pointer_cast<AudioContent> (*i)) { + + shared_ptr<AudioContent> ac = dynamic_pointer_cast<AudioContent> (*i); + if (ac && !ac->audio_mapping().mapped_dcp_channels().empty ()) { _views.push_back (shared_ptr<TimelineView> (new TimelineAudioContentView (*this, *i))); } @@ -132,6 +139,8 @@ Timeline::playlist_content_changed (int property) assign_tracks (); setup_pixels_per_second (); Refresh (); + } else if (property == AudioContentProperty::AUDIO_MAPPING) { + recreate_views (); } } @@ -303,7 +312,7 @@ Timeline::right_down (wxMouseEvent& ev) cv->set_selected (true); } - _menu.popup (_film, selected_content (), ev.GetPosition ()); + _menu.popup (_film, selected_content (), selected_views (), ev.GetPosition ()); } void |
