list<boost::shared_ptr<Playlist> > foo;
- /* the pmap is in the same order as the tracks in which selected regions occured */
+ /* the pmap is in the same order as the tracks in which selected regions occurred */
for (vector<PlaylistMapping>::iterator i = pmap.begin(); i != pmap.end(); ++i) {
if ((*i).pl) {
}
boost::shared_ptr<Playlist> playlist;
- vector<boost::shared_ptr<Region> > new_regions;
- vector<boost::shared_ptr<Region> >::iterator ri;
-
- create_region_from_selection (new_regions);
-
- if (new_regions.empty()) {
- return;
- }
-
- ri = new_regions.begin();
TrackViewList ts = selection->tracks.filter_to_unique_playlists ();
+
bool in_command = false;
for (TrackViewList::iterator i = ts.begin(); i != ts.end(); ++i) {
continue;
}
playlist->clear_changes ();
- framepos_t end;
+
if (clicked_selection) {
- end = selection->time[clicked_selection].end;
+ playlist->duplicate_range (selection->time[clicked_selection], times);
} else {
- end = selection->time.end_frame();
+ playlist->duplicate_ranges (selection->time, times);
}
- playlist->duplicate (*ri, end + 1, times);
if (!in_command) {
- begin_reversible_command (_("duplicate selection"));
+ begin_reversible_command (_("duplicate range selection"));
in_command = true;
}
_session->add_command (new StatefulDiffCommand (playlist));
- ++ri;
- if (ri == new_regions.end()) {
- --ri;
- }
}
if (in_command) {
+ // now "move" range selection to after the current range selection
+ framecnt_t distance = 0;
+
+ if (clicked_selection) {
+ distance = selection->time[clicked_selection].end -
+ selection->time[clicked_selection].start;
+ } else {
+ distance = selection->time.end_frame() - selection->time.start();
+ }
+
+ selection->move_time (distance);
+
commit_reversible_command ();
}
}
return;
}
- InsertTimeOption opt = d.intersected_region_action ();
-
insert_time (
- get_preferred_edit_position(),
+ get_preferred_edit_position (EDIT_IGNORE_MOUSE),
d.distance(),
- opt,
+ d.intersected_region_action (),
d.all_playlists(),
d.move_glued(),
d.move_markers(),
pl->shift (pos, -frames, true, ignore_music_glue);
if (!in_command) {
- begin_reversible_command (_("cut time"));
+ begin_reversible_command (_("remove time"));
in_command = true;
}
XMLNode &after = pl->get_state();
RouteTimeAxisView* rtav = dynamic_cast<RouteTimeAxisView*> (*x);
if (rtav) {
if (!in_command) {
- begin_reversible_command (_("cut time"));
+ begin_reversible_command (_("remove time"));
in_command = true;
}
rtav->route ()->shift (pos, -frames);
if (moved) {
if (!in_command) {
- begin_reversible_command (_("cut time"));
+ begin_reversible_command (_("remove time"));
in_command = true;
}
XMLNode& after (_session->locations()->get_state());