Build fixes for Boost >= 1.73
[dcpomatic.git] / src / wx / timeline_content_view.cc
index 6902a11d62633785e1f0d3dd910793e378a4a9ca..2af1c28ac3ce69086407df9daa431dad6aa8ed2f 100644 (file)
@@ -28,6 +28,9 @@
 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<Content> c)
        : TimelineView (tl)
@@ -149,9 +152,10 @@ TimelineContentView::do_paint (wxGraphicsContext* gc, list<dcpomatic::Rect<int>
        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