X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Fwx%2Ftimeline.cc;h=952945884117cdb1dbdabb6e653a5f8a9f20484c;hb=bdafb660e2549f65f7e5ae0e0f45e8227e91f6cf;hp=f91d2937f44ed51ac23aa94cff8a0bbe5674914f;hpb=6f23b55a7783f93549115a133ca2e6e938bd0cd1;p=dcpomatic.git diff --git a/src/wx/timeline.cc b/src/wx/timeline.cc index f91d2937f..952945884 100644 --- a/src/wx/timeline.cc +++ b/src/wx/timeline.cc @@ -20,6 +20,7 @@ #include "film_editor.h" #include "timeline.h" #include "timeline_time_axis_view.h" +#include "timeline_reels_view.h" #include "timeline_video_content_view.h" #include "timeline_audio_content_view.h" #include "timeline_subtitle_content_view.h" @@ -49,7 +50,8 @@ Timeline::Timeline (wxWindow* parent, ContentPanel* cp, shared_ptr film) : wxPanel (parent, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxFULL_REPAINT_ON_RESIZE) , _content_panel (cp) , _film (film) - , _time_axis_view (new TimelineTimeAxisView (*this, 32)) + , _time_axis_view (new TimelineTimeAxisView (*this, 64)) + , _reels_view (new TimelineReelsView (*this, 32)) , _tracks (0) , _left_down (false) , _down_view_position (0) @@ -96,7 +98,7 @@ Timeline::paint () void Timeline::film_changed (Film::Property p) { - if (p == Film::CONTENT) { + if (p == Film::CONTENT || p == Film::REEL_TYPE || p == Film::REEL_LENGTH) { ensure_ui_thread (); recreate_views (); } @@ -112,6 +114,7 @@ Timeline::recreate_views () _views.clear (); _views.push_back (_time_axis_view); + _views.push_back (_reels_view); BOOST_FOREACH (shared_ptr i, film->content ()) { if (dynamic_pointer_cast (i)) { @@ -203,7 +206,8 @@ Timeline::assign_tracks () _tracks = max (_tracks, t + 1); } - _time_axis_view->set_y (tracks() * track_height() + 32); + _time_axis_view->set_y (tracks() * track_height() + 64); + _reels_view->set_y (tracks() * track_height() + 32); } int