Fix some disambiguation errors in i18n.
[dcpomatic.git] / src / wx / timeline_content_view.cc
index 989be3fad8d0d07da5570c1329a84db9684e7e6b..b520b5ceb2bd40e292709c0ffe254232d016a6ec 100644 (file)
@@ -24,6 +24,7 @@
 #include <wx/graphics.h>
 #include <boost/foreach.hpp>
 
+using std::list;
 using boost::shared_ptr;
 
 TimelineContentView::TimelineContentView (Timeline& tl, shared_ptr<Content> c)
@@ -31,7 +32,7 @@ TimelineContentView::TimelineContentView (Timeline& tl, shared_ptr<Content> c)
        , _content (c)
        , _selected (false)
 {
-       _content_connection = c->Changed.connect (bind (&TimelineContentView::content_changed, this, _2, _3));
+       _content_connection = c->Changed.connect (bind (&TimelineContentView::content_changed, this, _2));
 }
 
 dcpomatic::Rect<int>
@@ -91,7 +92,7 @@ TimelineContentView::track () const
 }
 
 void
-TimelineContentView::do_paint (wxGraphicsContext* gc)
+TimelineContentView::do_paint (wxGraphicsContext* gc, list<dcpomatic::Rect<int> > overlaps)
 {
        DCPOMATIC_ASSERT (_track);
 
@@ -132,6 +133,12 @@ TimelineContentView::do_paint (wxGraphicsContext* gc)
                gc->StrokePath (path);
        }
 
+       /* Overlaps */
+       gc->SetBrush (*wxTheBrushList->FindOrCreateBrush (foreground_colour(), wxBRUSHSTYLE_CROSSDIAG_HATCH));
+       for (list<dcpomatic::Rect<int> >::const_iterator i = overlaps.begin(); i != overlaps.end(); ++i) {
+               gc->DrawRectangle (i->x, i->y + 4, i->width, i->height - 8);
+       }
+
        /* Label text */
        wxString name = std_to_wx (cont->summary());
        wxDouble name_width;
@@ -152,16 +159,11 @@ TimelineContentView::y_pos (int t) const
 }
 
 void
-TimelineContentView::content_changed (int p, bool frequent)
+TimelineContentView::content_changed (int p)
 {
        ensure_ui_thread ();
 
        if (p == ContentProperty::POSITION || p == ContentProperty::LENGTH) {
                force_redraw ();
        }
-
-       if (!frequent) {
-               _timeline.setup_pixels_per_second ();
-               _timeline.Refresh ();
-       }
 }