Don't allow to select VCAs in the route-list
authorRobin Gareus <robin@gareus.org>
Tue, 31 Jan 2017 19:40:31 +0000 (20:40 +0100)
committerRobin Gareus <robin@gareus.org>
Tue, 31 Jan 2017 19:42:33 +0000 (20:42 +0100)
gtk2_ardour/editor_routes.cc

index 1406ed43a7f9f78f151734df11e4aeab160ea0da..cec0969863107a9ed36c3e8c481500a1e2a78f9e 100644 (file)
@@ -1535,7 +1535,7 @@ EditorRoutes::selection_changed ()
 }
 
 bool
-EditorRoutes::selection_filter (Glib::RefPtr<TreeModel> const &, TreeModel::Path const&, bool /*selected*/)
+EditorRoutes::selection_filter (Glib::RefPtr<TreeModel> const& model, TreeModel::Path const& path, bool /*selected*/)
 {
        if (selection_countdown) {
                if (--selection_countdown == 0) {
@@ -1545,6 +1545,15 @@ EditorRoutes::selection_filter (Glib::RefPtr<TreeModel> const &, TreeModel::Path
                        return false;
                }
        }
+
+       TreeModel::iterator iter = model->get_iter (path);
+       if (iter) {
+               boost::shared_ptr<Stripable> stripable = (*iter)[_columns.stripable];
+               if (boost::dynamic_pointer_cast<VCA> (stripable)) {
+                       return false;
+               }
+       }
+
        return true;
 }