diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2007-11-26 17:20:34 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2007-11-26 17:20:34 +0000 |
commit | 1268bf8b45d2f7c4dad55f055b4f76d4b66c5dd3 (patch) | |
tree | f833ae99c935fca7c7afa6a686bdcb2bd4452046 /gtk2_ardour/editor_selection.cc | |
parent | 90a5607604a6a8853fa780285561aff706531589 (diff) |
more ongoing SAE-driven changes (too many too list here)
git-svn-id: svn://localhost/ardour2/branches/2.0-ongoing@2715 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/editor_selection.cc')
-rw-r--r-- | gtk2_ardour/editor_selection.cc | 34 |
1 files changed, 6 insertions, 28 deletions
diff --git a/gtk2_ardour/editor_selection.cc b/gtk2_ardour/editor_selection.cc index 28aeddd8bd..25c2206405 100644 --- a/gtk2_ardour/editor_selection.cc +++ b/gtk2_ardour/editor_selection.cc @@ -558,40 +558,18 @@ Editor::set_selected_regionview_from_click (bool press, Selection::Operation op, return commit; } + void Editor::set_selected_regionview_from_region_list (boost::shared_ptr<Region> region, Selection::Operation op) { vector<RegionView*> all_equivalent_regions; - for (TrackViewList::iterator i = track_views.begin(); i != track_views.end(); ++i) { - - RouteTimeAxisView* tatv; - - if ((tatv = dynamic_cast<RouteTimeAxisView*> (*i)) != 0) { - - boost::shared_ptr<Playlist> pl; - vector<boost::shared_ptr<Region> > results; - RegionView* marv; - boost::shared_ptr<Diskstream> ds; - - if ((ds = tatv->get_diskstream()) == 0) { - /* bus */ - continue; - } - - if ((pl = (ds->playlist())) != 0) { - pl->get_region_list_equivalent_regions (region, results); - } - - for (vector<boost::shared_ptr<Region> >::iterator ir = results.begin(); ir != results.end(); ++ir) { - if ((marv = tatv->view()->find_view (*ir)) != 0) { - all_equivalent_regions.push_back (marv); - } - } - - } + get_regions_corresponding_to (region, all_equivalent_regions); + + if (all_equivalent_regions.empty()) { + return; } - + switch (op) { case Selection::Toggle: /* XXX this is not correct */ |