#include "ardour/strip_silence.h"
#include "ardour/route_group.h"
#include "ardour/operations.h"
+#include "ardour/session_playlists.h"
#include "ardour_ui.h"
#include "debug.h"
Location * looploc = _session->locations()->auto_loop_location();
Location * punchloc = _session->locations()->auto_punch_location();
+ Location * sessionloc = _session->locations()->session_range_location();
_session->locations()->clear_ranges ();
// re-add these
if (looploc) _session->locations()->add (looploc);
if (punchloc) _session->locations()->add (punchloc);
+ if (sessionloc) _session->locations()->add (sessionloc);
XMLNode &after = _session->locations()->get_state();
_session->add_command(new MementoCommand<Locations>(*(_session->locations()), &before, &after));
d.set_size_request (300, -1);
d.set_position (Gtk::WIN_POS_MOUSE);
- entry.set_text (selection->regions.front()->region()->name());
+ entry.set_text (rs.front()->region()->name());
entry.select_region (0, -1);
entry.signal_activate().connect (sigc::bind (sigc::mem_fun (d, &Dialog::response), RESPONSE_OK));
boost::shared_ptr<Region> r = rtv->track()->bounce_range (start, start+cnt, itt, enable_processing);
+ if (!r) {
+ continue;
+ }
+
if (replace) {
list<AudioRange> ranges;
ranges.push_back (AudioRange (start, start+cnt, 0));
}
if (first) {
- new_state = !rtav->route()->soloed ();
+ new_state = !rtav->route()->muted();
first = false;
}
Editor::toggle_region_fades (int dir)
{
boost::shared_ptr<AudioRegion> ar;
- bool yn;
+ bool yn = false;
RegionSelection rs = get_regions_from_selection_and_entered ();
get_preferred_edit_position(),
d.distance(),
opt,
+ d.all_playlists(),
d.move_glued(),
d.move_markers(),
d.move_glued_markers(),
}
void
-Editor::insert_time (framepos_t pos, framecnt_t frames, InsertTimeOption opt,
- bool ignore_music_glue, bool markers_too, bool glued_markers_too, bool locked_markers_too, bool tempo_too)
+Editor::insert_time (
+ framepos_t pos, framecnt_t frames, InsertTimeOption opt,
+ bool all_playlists, bool ignore_music_glue, bool markers_too, bool glued_markers_too, bool locked_markers_too, bool tempo_too
+ )
{
bool commit = false;
begin_reversible_command (_("insert time"));
for (TrackSelection::iterator x = selection->tracks.begin(); x != selection->tracks.end(); ++x) {
+
/* regions */
- boost::shared_ptr<Playlist> pl = (*x)->playlist();
- if (pl) {
+ vector<boost::shared_ptr<Playlist> > pl;
+ if (all_playlists) {
+ RouteTimeAxisView* rtav = dynamic_cast<RouteTimeAxisView*> (*x);
+ if (rtav) {
+ pl = _session->playlists->playlists_for_track (rtav->track ());
+ }
+ } else {
+ if ((*x)->playlist ()) {
+ pl.push_back ((*x)->playlist ());
+ }
+ }
- pl->clear_changes ();
- pl->clear_owned_changes ();
+ for (vector<boost::shared_ptr<Playlist> >::iterator i = pl.begin(); i != pl.end(); ++i) {
+
+ (*i)->clear_changes ();
+ (*i)->clear_owned_changes ();
if (opt == SplitIntersected) {
- pl->split (pos);
+ (*i)->split (pos);
}
- pl->shift (pos, frames, (opt == MoveIntersected), ignore_music_glue);
+ (*i)->shift (pos, frames, (opt == MoveIntersected), ignore_music_glue);
vector<Command*> cmds;
- pl->rdiff (cmds);
+ (*i)->rdiff (cmds);
_session->add_commands (cmds);
- _session->add_command (new StatefulDiffCommand (pl));
+ _session->add_command (new StatefulDiffCommand (*i));
commit = true;
}