modified fix from carl for region copy-moves-original-to-start bug; change verbose...
[ardour.git] / gtk2_ardour / region_selection.cc
index 34810691f5c33e3f1cc678b9dc056daa0f6f55bc..7ac7763773a6848aa90d871d4e0df8d09de27ab0 100644 (file)
@@ -31,12 +31,16 @@ using namespace sigc;
 
 RegionSelection::RegionSelection ()
 {
+       RegionView::RegionViewGoingAway.connect (mem_fun(*this, &RegionSelection::remove_it));
+
        _current_start = 0;
        _current_end = 0;
 }
 
 RegionSelection::RegionSelection (const RegionSelection& other)
 {
+       RegionView::RegionViewGoingAway.connect (mem_fun(*this, &RegionSelection::remove_it));
+
        for (RegionSelection::const_iterator i = other.begin(); i != other.end(); ++i) {
                add (*i);
        }
@@ -44,8 +48,6 @@ RegionSelection::RegionSelection (const RegionSelection& other)
        _current_end = other._current_end;
 }
 
-
-
 RegionSelection&
 RegionSelection::operator= (const RegionSelection& other)
 {
@@ -86,8 +88,6 @@ RegionSelection::add (RegionView* rv)
                return false;
        }
 
-       rv->RegionViewGoingAway.connect (mem_fun(*this, &RegionSelection::remove_it));
-
        if (rv->region()->first_frame() < _current_start || empty()) {
                _current_start = rv->region()->first_frame();
        }