son't try to select non-existent notes after editing (and thus crash).
[ardour.git] / gtk2_ardour / track_selection.cc
old mode 100755 (executable)
new mode 100644 (file)
index 9aa29bd..6937eb6
 */
 
 #include <algorithm>
+
 #include "ardour/route_group.h"
+#include "control_protocol/control_protocol.h"
+
 #include "track_selection.h"
 #include "time_axis_view.h"
 #include "public_editor.h"
@@ -29,7 +32,10 @@ TrackSelection::TrackSelection (PublicEditor const * e, TrackViewList const &t)
        : TrackViewList (t)
        , _editor (e)
 {
+}
 
+TrackSelection::~TrackSelection ()
+{
 }
 
 TrackViewList
@@ -41,7 +47,7 @@ TrackSelection::add (TrackViewList const & t)
 
                /* select anything in the same select-enabled route group */
                ARDOUR::RouteGroup* rg = (*i)->route_group ();
-               if (rg && rg->property (ARDOUR::RouteGroup::Select)) {
+               if (rg && rg->is_active() && rg->is_select ()) {
                        TrackViewList tr = _editor->axis_views_from_routes (rg->route_list ());
                        for (TrackViewList::iterator j = tr.begin(); j != tr.end(); ++j) {
                                if (!contains (*j)) {
@@ -54,4 +60,3 @@ TrackSelection::add (TrackViewList const & t)
 
        return added;
 }
-