Make edit groups effective with lassoo selections.
authorCarl Hetherington <carl@carlh.net>
Sat, 6 Oct 2007 18:39:44 +0000 (18:39 +0000)
committerCarl Hetherington <carl@carlh.net>
Sat, 6 Oct 2007 18:39:44 +0000 (18:39 +0000)
git-svn-id: svn://localhost/ardour2/trunk@2526 d708f5d6-7413-0410-9779-e7cbd77b26cf

gtk2_ardour/editor_selection.cc

index 9341bc30b078a136aa59561f850046309c4035ab..304c2aae82354d7ddd1985923256de55fa1f0acc 100644 (file)
@@ -782,6 +782,26 @@ Editor::select_all_within (nframes_t start, nframes_t end, double top, double bo
                return false;
        }
 
+       /* `touched' may contain some regions; if so, we need to add equivalent
+          regions from any edit groups */
+
+       list<Selectable*> to_add;
+
+       for (list<Selectable*>::iterator i = touched.begin(); i != touched.end(); ++i) {
+               RegionView* r = dynamic_cast<RegionView*> (*i);
+               if (r) {
+                       vector<RegionView*> e;
+                       get_equivalent_regions (r, e);
+                       for (vector<RegionView*>::iterator j = e.begin(); j != e.end(); ++j) {
+                               to_add.push_back (*j);
+                       }
+               }
+       }
+
+       for (list<Selectable*>::iterator i = to_add.begin(); i != to_add.end(); ++i) {
+               touched.push_back (*i);
+       }
+
        if (!touched_tracks.empty()) {
 
                switch (op) {