Enable mysteriously disabled multi-selected-content edit of timing and
[dcpomatic.git] / src / wx / timeline.cc
index 8633e47b9bc0e639378ca006f96916ade00ec2b2..f93953737781b953751979f9c69177daf4c63158 100644 (file)
@@ -40,7 +40,6 @@
 #include <wx/graphics.h>
 #include <boost/weak_ptr.hpp>
 #include <boost/foreach.hpp>
-#include <boost/make_shared.hpp>
 #include <list>
 #include <iostream>
 
@@ -48,7 +47,6 @@ using std::list;
 using std::cout;
 using std::max;
 using boost::shared_ptr;
-using boost::make_shared;
 using boost::weak_ptr;
 using boost::dynamic_pointer_cast;
 using boost::bind;
@@ -150,23 +148,21 @@ Timeline::recreate_views ()
        _views.push_back (_reels_view);
        _views.push_back (_labels_view);
 
-       /* XXX: make_shared does not work here on some compilers due to some strange const problem */
-
        BOOST_FOREACH (shared_ptr<Content> i, film->content ()) {
                if (i->video) {
-                       _views.push_back (shared_ptr<TimelineContentView> (new TimelineVideoContentView (*this, i)));
+                       _views.push_back (shared_ptr<TimelineView> (new TimelineVideoContentView (*this, i)));
                }
 
                if (i->audio && !i->audio->mapping().mapped_output_channels().empty ()) {
-                       _views.push_back (shared_ptr<TimelineContentView> (new TimelineAudioContentView (*this, i)));
+                       _views.push_back (shared_ptr<TimelineView> (new TimelineAudioContentView (*this, i)));
                }
 
                if (i->subtitle) {
-                       _views.push_back (shared_ptr<TimelineContentView> (new TimelineSubtitleContentView (*this, i)));
+                       _views.push_back (shared_ptr<TimelineView> (new TimelineSubtitleContentView (*this, i)));
                }
 
                if (dynamic_pointer_cast<AtmosMXFContent> (i)) {
-                       _views.push_back (shared_ptr<TimelineContentView> (new TimelineAtmosContentView (*this, i)));
+                       _views.push_back (shared_ptr<TimelineView> (new TimelineAtmosContentView (*this, i)));
                }
        }
 
@@ -266,7 +262,7 @@ Timeline::assign_tracks ()
                                shared_ptr<Content> test_content = test->content();
 
                                if (test && test->track() && test->track().get() == t) {
-                                       if (content_period.overlaps (DCPTimePeriod(test_content->position(), test_content->end()))) {
+                                       if (content_period.overlap (DCPTimePeriod(test_content->position(), test_content->end()))) {
                                                /* we have an overlap on track `t' */
                                                ++t;
                                                break;
@@ -387,9 +383,9 @@ Timeline::left_up (wxMouseEvent& ev)
 
        if (_down_view) {
                _down_view->content()->set_change_signals_frequent (false);
-               _content_panel->set_selection (_down_view->content ());
        }
 
+       _content_panel->set_selection (selected_content ());
        set_position_from_event (ev);
 
        /* Clear up up the stuff we don't do during drag */