install single color theme file during waf install
[ardour.git] / gtk2_ardour / selection.cc
index d1b712e3d76fb6c133b5a0b2cc499d3c3790526a..7e2ee1338b00c35da9a18cebb9faf956fe0bfc76 100644 (file)
@@ -399,6 +399,8 @@ Selection::add (const list<boost::shared_ptr<Playlist> >& pllist)
 void
 Selection::add (const TrackViewList& track_list)
 {
+       clear_objects();  //enforce object/range exclusivity
+
        TrackViewList added = tracks.add (track_list);
 
        if (!added.empty()) {
@@ -414,6 +416,8 @@ Selection::add (const TrackViewList& track_list)
 void
 Selection::add (TimeAxisView* track)
 {
+       clear_objects();  //enforce object/range exclusivity
+
        TrackViewList tr;
        track->set_selected (true);
        tr.push_back (track);
@@ -836,7 +840,6 @@ long
 Selection::set (framepos_t start, framepos_t end)
 {
        clear_objects();  //enforce region/object exclusivity
-       clear_tracks();  //enforce object/track exclusivity
        clear_time();
 
        if ((start == 0 && end == 0) || end < start) {
@@ -948,7 +951,7 @@ Selection::empty (bool internal_selection)
           as a cut buffer.
        */
 
-       return object_level_empty && midi_notes.empty();
+       return object_level_empty && midi_notes.empty() && points.empty();
 }
 
 void
@@ -999,7 +1002,7 @@ Selection::toggle (list<Selectable*> const & selectables)
                        fatal << _("programming error: ")
                              << X_("unknown selectable type passed to Selection::toggle()")
                              << endmsg;
-                       /*NOTREACHED*/
+                       abort(); /*NOTREACHED*/
                }
        }
 
@@ -1053,7 +1056,7 @@ Selection::add (list<Selectable*> const & selectables)
                        fatal << _("programming error: ")
                              << X_("unknown selectable type passed to Selection::add()")
                              << endmsg;
-                       /*NOTREACHED*/
+                       abort(); /*NOTREACHED*/
                }
        }
 
@@ -1262,7 +1265,7 @@ Selection::set_state (XMLNode const & node, int)
                        RouteTimeAxisView* rtv = editor->get_route_view_by_route_id (id);
 
                        if (rtv) {
-                               boost::shared_ptr<AutomationTimeAxisView> atv = rtv->automation_child (EventTypeMap::instance().new_parameter (prop_parameter->value ()));
+                               boost::shared_ptr<AutomationTimeAxisView> atv = rtv->automation_child (EventTypeMap::instance().from_symbol (prop_parameter->value ()));
 
                                /* the automation could be for an entity that was never saved
                                   in the session file. Don't freak out if we can't find