ContentMenu was keeping its initial film and not using the current one; should fix...
[dcpomatic.git] / src / wx / timeline.cc
index def52ad9d5d78779641bcf7e958d4222da0135e4..6cc1f79d93dd23c9d0b089648f36edcf1892c893 100644 (file)
@@ -75,6 +75,8 @@ private:
        dcpomatic::Rect<int> _last_paint_bbox;
 };
 
+
+/** Parent class for views of pieces of content */
 class ContentView : public View
 {
 public:
@@ -160,7 +162,7 @@ private:
                gc->StrokePath (path);
                gc->FillPath (path);
 
-               wxString name = wxString::Format (wxT ("%s [%s]"), std_to_wx (cont->path().filename().string()).data(), type().data());
+               wxString name = wxString::Format (wxT ("%s [%s]"), std_to_wx (cont->path_summary()).data(), type().data());
                wxDouble name_width;
                wxDouble name_height;
                wxDouble name_descent;
@@ -323,6 +325,7 @@ private:
        int _y;
 };
 
+
 Timeline::Timeline (wxWindow* parent, FilmEditor* ed, shared_ptr<Film> film)
        : wxPanel (parent, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxFULL_REPAINT_ON_RESIZE)
        , _film_editor (ed)
@@ -333,7 +336,7 @@ Timeline::Timeline (wxWindow* parent, FilmEditor* ed, shared_ptr<Film> film)
        , _left_down (false)
        , _down_view_position (0)
        , _first_move (false)
-       , _menu (film, this)
+       , _menu (this)
        , _snap (true)
 {
 #ifndef __WXOSX__
@@ -571,7 +574,7 @@ Timeline::right_down (wxMouseEvent& ev)
                cv->set_selected (true);
        }
 
-       _menu.popup (selected_content (), ev.GetPosition ());
+       _menu.popup (_film, selected_content (), ev.GetPosition ());
 }
 
 void