mirror of
https://github.com/Ardour/ardour.git
synced 2026-01-03 12:19:33 +01:00
Make crossfade convert-to-full and activate/deactivate work across edit groups (#4658).
git-svn-id: svn://localhost/ardour2/branches/3.0@11413 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
6b65e684eb
commit
452672f78f
5 changed files with 106 additions and 29 deletions
|
|
@ -27,6 +27,7 @@
|
|||
#include "ardour/route_group.h"
|
||||
#include "ardour/profile.h"
|
||||
#include "ardour/midi_region.h"
|
||||
#include "ardour/audioplaylist.h"
|
||||
|
||||
#include "editor.h"
|
||||
#include "actions.h"
|
||||
|
|
@ -35,6 +36,7 @@
|
|||
#include "audio_streamview.h"
|
||||
#include "automation_line.h"
|
||||
#include "control_point.h"
|
||||
#include "crossfade_view.h"
|
||||
#include "editor_regions.h"
|
||||
#include "editor_cursors.h"
|
||||
#include "midi_region_view.h"
|
||||
|
|
@ -474,6 +476,32 @@ Editor::mapped_get_equivalent_regions (RouteTimeAxisView& tv, uint32_t, RegionVi
|
|||
}
|
||||
}
|
||||
|
||||
void
|
||||
Editor::mapped_get_equivalent_crossfades (
|
||||
RouteTimeAxisView& tv, uint32_t, boost::shared_ptr<Crossfade> basis, vector<boost::shared_ptr<Crossfade> >* equivs
|
||||
) const
|
||||
{
|
||||
boost::shared_ptr<Playlist> pl;
|
||||
vector<boost::shared_ptr<Crossfade> > results;
|
||||
boost::shared_ptr<Track> tr;
|
||||
|
||||
if ((tr = tv.track()) == 0) {
|
||||
/* bus */
|
||||
return;
|
||||
}
|
||||
|
||||
if ((pl = tr->playlist()) != 0) {
|
||||
boost::shared_ptr<AudioPlaylist> apl = boost::dynamic_pointer_cast<AudioPlaylist> (pl);
|
||||
if (apl) {
|
||||
apl->get_equivalent_crossfades (basis, *equivs);
|
||||
}
|
||||
}
|
||||
|
||||
/* We might have just checked basis for equivalency with itself, so we need to remove dupes */
|
||||
sort (equivs->begin (), equivs->end ());
|
||||
unique (equivs->begin (), equivs->end ());
|
||||
}
|
||||
|
||||
void
|
||||
Editor::get_equivalent_regions (RegionView* basis, vector<RegionView*>& equivalent_regions, PBD::PropertyID property) const
|
||||
{
|
||||
|
|
@ -507,6 +535,18 @@ Editor::get_equivalent_regions (RegionSelection & basis, PBD::PropertyID prop) c
|
|||
return equivalent;
|
||||
}
|
||||
|
||||
vector<boost::shared_ptr<Crossfade> >
|
||||
Editor::get_equivalent_crossfades (RouteTimeAxisView& v, boost::shared_ptr<Crossfade> c, PBD::PropertyID prop) const
|
||||
{
|
||||
vector<boost::shared_ptr<Crossfade> > e;
|
||||
mapover_tracks_with_unique_playlists (
|
||||
sigc::bind (sigc::mem_fun (*this, &Editor::mapped_get_equivalent_crossfades), c, &e),
|
||||
&v,
|
||||
prop
|
||||
);
|
||||
|
||||
return e;
|
||||
}
|
||||
|
||||
int
|
||||
Editor::get_regionview_count_from_region_list (boost::shared_ptr<Region> region)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue