diff --git a/gtk2_ardour/region_selection.cc b/gtk2_ardour/region_selection.cc index 10e708ed72..f1e8eff8e6 100644 --- a/gtk2_ardour/region_selection.cc +++ b/gtk2_ardour/region_selection.cc @@ -39,7 +39,6 @@ using namespace PBD; */ RegionSelection::RegionSelection () { - RegionView::RegionViewGoingAway.connect (death_connection, MISSING_INVALIDATOR, boost::bind (&RegionSelection::remove_it, this, _1), gui_context()); } /** Copy constructor. @@ -48,8 +47,6 @@ RegionSelection::RegionSelection () RegionSelection::RegionSelection (const RegionSelection& other) : std::list() { - RegionView::RegionViewGoingAway.connect (death_connection, MISSING_INVALIDATOR, boost::bind (&RegionSelection::remove_it, this, _1), gui_context()); - for (RegionSelection::const_iterator i = other.begin(); i != other.end(); ++i) { add (*i); } @@ -132,15 +129,6 @@ RegionSelection::add (RegionView* rv) return true; } -/** Remove a region from the selection. - * @param rv Region to remove. - */ -void -RegionSelection::remove_it (RegionView *rv) -{ - remove (rv); -} - /** Remove a region from the selection. * @param rv Region to remove. * @return true if the region was in the selection, false if not. diff --git a/gtk2_ardour/region_selection.h b/gtk2_ardour/region_selection.h index 2ace12432f..a27ae2b9a8 100644 --- a/gtk2_ardour/region_selection.h +++ b/gtk2_ardour/region_selection.h @@ -72,12 +72,9 @@ public: ARDOUR::RegionList regionlist () const; private: - void remove_it (RegionView*); - void add_to_layer (RegionView *); std::list _bylayer; ///< list of regions sorted by layer - PBD::ScopedConnection death_connection; }; #endif /* __ardour_gtk_region_selection_h__ */ diff --git a/gtk2_ardour/selection.cc b/gtk2_ardour/selection.cc index 07638c5463..aaa09cd9b5 100644 --- a/gtk2_ardour/selection.cc +++ b/gtk2_ardour/selection.cc @@ -77,6 +77,9 @@ Selection::Selection (const PublicEditor* e, bool mls) void (Selection::*point_remove)(ControlPoint*) = &Selection::remove; ControlPoint::CatchDeletion.connect (*this, MISSING_INVALIDATOR, boost::bind (point_remove, this, _1), gui_context()); + + void (Selection::*rv_remove)(RegionView*) = &Selection::remove; + RegionView::RegionViewGoingAway.connect (*this, MISSING_INVALIDATOR, boost::bind (rv_remove, this, _1), gui_context()); } #if 0