13
0

Don't use the edit position to gather regions to cut, otherwise it can be confusing.

git-svn-id: svn://localhost/ardour2/branches/3.0@5585 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
Carl Hetherington 2009-08-24 20:56:24 +00:00
parent df71243d6c
commit 32dd2a43d8
3 changed files with 19 additions and 20 deletions

View File

@ -4590,12 +4590,12 @@ Editor::get_regions_after (RegionSelection& rs, nframes64_t where, const TrackSe
* - selected or
* - the entered_regionview (if allow_entered == true) or
* - under the preferred edit position AND on a selected track, or on a track
* which is in the same active edit-enable route group as a selected region.
* which is in the same active edit-enable route group as a selected region (if allow_edit_position == true)
* @param rs Returned region list.
* @param allow_entered true to include the entered_regionview in the list.
*/
void
Editor::get_regions_for_action (RegionSelection& rs, bool allow_entered)
Editor::get_regions_for_action (RegionSelection& rs, bool allow_entered, bool allow_edit_position)
{
/* Start with selected regions */
rs = selection->regions;
@ -4605,23 +4605,22 @@ Editor::get_regions_for_action (RegionSelection& rs, bool allow_entered)
rs.add (entered_regionview);
}
TrackSelection tracks = selection->tracks;
RegionSelection to_map = rs;
/* tracks is currently the set of selected tracks; add any other tracks that
* have regions that are in the same edit-activated route group as one of
* our regions */
for (RegionSelection::iterator i = to_map.begin (); i != to_map.end(); ++i) {
RouteGroup* g = (*i)->get_time_axis_view().route_group ();
if (g && g->active_property (RouteGroup::Edit)) {
tracks.add (axis_views_from_routes (g->route_list()));
if (allow_edit_position) {
TrackSelection tracks = selection->tracks;
/* tracks is currently the set of selected tracks; add any other tracks that
* have regions that are in the same edit-activated route group as one of
* our regions */
for (RegionSelection::iterator i = rs.begin (); i != rs.end(); ++i) {
RouteGroup* g = (*i)->get_time_axis_view().route_group ();
if (g && g->active_property (RouteGroup::Edit)) {
tracks.add (axis_views_from_routes (g->route_list()));
}
}
}
/* now find regions that are at the edit position on those tracks */
for (RegionSelection::iterator i = to_map.begin (); i != to_map.end(); ++i) {
/* now find regions that are at the edit position on those tracks */
nframes64_t const where = get_preferred_edit_position ();
get_regions_at (rs, where, tracks);
}

View File

@ -1976,7 +1976,7 @@ public:
void get_regions_at (RegionSelection&, nframes64_t where, const TrackSelection& ts) const;
void get_regions_after (RegionSelection&, nframes64_t where, const TrackSelection& ts) const;
void get_regions_for_action (RegionSelection&, bool allowed_entered_regionview = false);
void get_regions_for_action (RegionSelection&, bool allow_entered = false, bool allow_edit_position = true);
sigc::connection fast_screen_update_connection;
gint start_updating ();

View File

@ -3915,9 +3915,9 @@ Editor::cut_copy (CutCopyOp op)
/* we only want to cut regions if some are selected */
if (!selection->regions.empty()) {
get_regions_for_action (rs);
get_regions_for_action (rs, false, false);
}
switch (current_mouse_mode()) {
case MouseObject:
if (!rs.empty() || !selection->points.empty()) {