Cruft removal: behavior of Region List no longer needs these functions (gtk part)
This commit is contained in:
parent
c2fb85e37e
commit
285101d88c
|
@ -5153,7 +5153,7 @@ Editor::get_per_region_note_selection (list<pair<PBD::ID, set<boost::shared_ptr<
|
|||
}
|
||||
|
||||
void
|
||||
Editor::get_regionviews_corresponding_to (boost::shared_ptr<Region> region, vector<RegionView*>& regions, bool src_comparison)
|
||||
Editor::get_regionview_corresponding_to (boost::shared_ptr<Region> region, vector<RegionView*>& regions)
|
||||
{
|
||||
for (TrackViewList::iterator i = track_views.begin(); i != track_views.end(); ++i) {
|
||||
|
||||
|
@ -5162,7 +5162,6 @@ Editor::get_regionviews_corresponding_to (boost::shared_ptr<Region> region, vect
|
|||
if ((tatv = dynamic_cast<RouteTimeAxisView*> (*i)) != 0) {
|
||||
|
||||
boost::shared_ptr<Playlist> pl;
|
||||
vector<boost::shared_ptr<Region> > results;
|
||||
RegionView* marv;
|
||||
boost::shared_ptr<Track> tr;
|
||||
|
||||
|
@ -5171,20 +5170,9 @@ Editor::get_regionviews_corresponding_to (boost::shared_ptr<Region> region, vect
|
|||
continue;
|
||||
}
|
||||
|
||||
if ((pl = (tr->playlist())) != 0) {
|
||||
if (src_comparison) {
|
||||
pl->get_source_equivalent_regions (region, results);
|
||||
} else {
|
||||
pl->get_region_list_equivalent_regions (region, results);
|
||||
}
|
||||
if ((marv = tatv->view()->find_view (region)) != 0) {
|
||||
regions.push_back (marv);
|
||||
}
|
||||
|
||||
for (vector<boost::shared_ptr<Region> >::iterator ir = results.begin(); ir != results.end(); ++ir) {
|
||||
if ((marv = tatv->view()->find_view (*ir)) != 0) {
|
||||
regions.push_back (marv);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -449,8 +449,6 @@ public:
|
|||
return track_views;
|
||||
}
|
||||
|
||||
int get_regionview_count_from_region_list (boost::shared_ptr<ARDOUR::Region>);
|
||||
|
||||
void do_ptimport(std::string path, ARDOUR::SrcQuality quality);
|
||||
|
||||
void do_import (std::vector<std::string> paths,
|
||||
|
@ -470,7 +468,7 @@ public:
|
|||
samplepos_t& pos,
|
||||
boost::shared_ptr<ARDOUR::PluginInfo> instrument = boost::shared_ptr<ARDOUR::PluginInfo>());
|
||||
|
||||
void get_regionviews_corresponding_to (boost::shared_ptr<ARDOUR::Region> region, std::vector<RegionView*>& regions, bool src_comparison);
|
||||
void get_regionview_corresponding_to (boost::shared_ptr<ARDOUR::Region> region, std::vector<RegionView*>& regions);
|
||||
|
||||
void get_regionviews_by_id (PBD::ID const id, RegionSelection & regions) const;
|
||||
void get_per_region_note_selection (std::list<std::pair<PBD::ID, std::set<boost::shared_ptr<Evoral::Note<Temporal::Beats> > > > >&) const;
|
||||
|
|
|
@ -597,44 +597,6 @@ Editor::get_equivalent_regions (RegionSelection & basis, PBD::PropertyID prop) c
|
|||
return equivalent;
|
||||
}
|
||||
|
||||
int
|
||||
Editor::get_regionview_count_from_region_list (boost::shared_ptr<Region> region)
|
||||
{
|
||||
int region_count = 0;
|
||||
|
||||
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<Track> tr;
|
||||
|
||||
if ((tr = tatv->track()) == 0) {
|
||||
/* bus */
|
||||
continue;
|
||||
}
|
||||
|
||||
if ((pl = (tr->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) {
|
||||
region_count++;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
return region_count;
|
||||
}
|
||||
|
||||
|
||||
bool
|
||||
Editor::set_selected_regionview_from_click (bool press, Selection::Operation op)
|
||||
{
|
||||
|
@ -995,11 +957,11 @@ Editor::set_selection (std::list<Selectable*> s, Selection::Operation op)
|
|||
void
|
||||
Editor::set_selected_regionview_from_region_list (boost::shared_ptr<Region> region, Selection::Operation op)
|
||||
{
|
||||
vector<RegionView*> all_equivalent_regions;
|
||||
vector<RegionView*> regionviews;
|
||||
|
||||
get_regionviews_corresponding_to (region, all_equivalent_regions, region->whole_file());
|
||||
get_regionview_corresponding_to (region, regionviews);
|
||||
|
||||
if (all_equivalent_regions.empty()) {
|
||||
if (regionviews.empty()) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -1008,16 +970,16 @@ Editor::set_selected_regionview_from_region_list (boost::shared_ptr<Region> regi
|
|||
switch (op) {
|
||||
case Selection::Toggle:
|
||||
/* XXX this is not correct */
|
||||
selection->toggle (all_equivalent_regions);
|
||||
selection->toggle (regionviews);
|
||||
break;
|
||||
case Selection::Set:
|
||||
selection->set (all_equivalent_regions);
|
||||
selection->set (regionviews);
|
||||
break;
|
||||
case Selection::Extend:
|
||||
selection->add (all_equivalent_regions);
|
||||
selection->add (regionviews);
|
||||
break;
|
||||
case Selection::Add:
|
||||
selection->add (all_equivalent_regions);
|
||||
selection->add (regionviews);
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user