X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Fwx%2Ftimeline_content_view.cc;h=2af1c28ac3ce69086407df9daa431dad6aa8ed2f;hb=c04fec82d25127fafa73c3daff87bece9aa8c8e8;hp=69f1723cee28b6ea055ab647a1833882fa7a0e67;hpb=254b3044d72de6b033d7c584f5abd2b9aa70aad5;p=dcpomatic.git diff --git a/src/wx/timeline_content_view.cc b/src/wx/timeline_content_view.cc index 69f1723ce..2af1c28ac 100644 --- a/src/wx/timeline_content_view.cc +++ b/src/wx/timeline_content_view.cc @@ -27,6 +27,10 @@ using std::list; using boost::shared_ptr; +using namespace dcpomatic; +#if BOOST_VERSION >= 106100 +using namespace boost::placeholders; +#endif TimelineContentView::TimelineContentView (Timeline& tl, shared_ptr c) : TimelineView (tl) @@ -127,7 +131,7 @@ TimelineContentView::do_paint (wxGraphicsContext* gc, list /* Reel split points */ gc->SetPen (*wxThePenList->FindOrCreatePen (foreground_colour(), 1, wxPENSTYLE_DOT)); - BOOST_FOREACH (DCPTime i, cont->reel_split_points ()) { + BOOST_FOREACH (DCPTime i, cont->reel_split_points(film)) { path = gc->CreatePath (); path.MoveToPoint (time_x (i), y_pos (_track.get()) + 4); path.AddLineToPoint (time_x (i), y_pos (_track.get() + 1) - 4); @@ -148,9 +152,10 @@ TimelineContentView::do_paint (wxGraphicsContext* gc, list wxDouble lab_leading; gc->SetFont (gc->CreateFont (*wxNORMAL_FONT, foreground_colour ())); gc->GetTextExtent (lab, &lab_width, &lab_height, &lab_descent, &lab_leading); + gc->PushState (); gc->Clip (wxRegion (time_x (position), y_pos (_track.get()), len.seconds() * _timeline.pixels_per_second().get_value_or(0), _timeline.pixels_per_track())); gc->DrawText (lab, time_x (position) + 12, y_pos (_track.get() + 1) - lab_height - 4); - gc->ResetClip (); + gc->PopState (); } int