return;
}
+ /* find all the tracks that have selected regions */
+
+ set<TimeAxisView*> tracks;
+
+ for (RegionSelection::const_iterator r = selection->regions.begin(); r != selection->regions.end(); ++r) {
+ tracks.insert (&(*r)->get_time_axis_view());
+ }
+
+ TrackViewList tvl;
+ tvl.insert (tvl.end(), tracks.begin(), tracks.end());
+
+ /* select range (this will clear the region selection) */
+
selection->set (selection->regions.start(), selection->regions.end_frame());
+
+ /* and select the tracks */
- //we must now select tracks, because otherwise set_selection_from_region would appear to do nothing
- //perhaps too drastic; perhaps the user really only wants the region's track selected
- //but I can't think of any use-case for that (why wouldn't you just select the region?)
- select_all_tracks();
+ selection->set (tvl);
if (!Profile->get_sae()) {
set_mouse_mode (Editing::MouseRange, false);
list<Selectable *> touched;
if (after) {
- start = get_preferred_edit_position(false, true);
+ start = get_preferred_edit_position(EDIT_IGNORE_NONE, true);
end = _session->current_end_frame();
} else {
- if ((end = get_preferred_edit_position(false, true)) > 1) {
+ if ((end = get_preferred_edit_position(EDIT_IGNORE_NONE, true)) > 1) {
start = 0;
end -= 1;
} else {