diff --git a/gtk2_ardour/selection.cc b/gtk2_ardour/selection.cc index 9a136bd4b8..8769c69f9e 100644 --- a/gtk2_ardour/selection.cc +++ b/gtk2_ardour/selection.cc @@ -137,10 +137,12 @@ Selection::clear_tracks () } void -Selection::clear_time () +Selection::clear_time (bool clear_applied_tracks/*=true*/) { time.clear(); - time.tracks_in_range.clear(); + if (clear_applied_tracks) { + time.tracks_in_range.clear(); + } TimeChanged (); } @@ -864,7 +866,7 @@ long Selection::set (framepos_t start, framepos_t end) { clear_objects(); //enforce region/object exclusivity - clear_time(); + clear_time(false); //do not clear tracks time selection is applied to if ((start == 0 && end == 0) || end < start) { return 0; diff --git a/gtk2_ardour/selection.h b/gtk2_ardour/selection.h index 8d3e7fccc0..b8ffac9ec7 100644 --- a/gtk2_ardour/selection.h +++ b/gtk2_ardour/selection.h @@ -199,7 +199,7 @@ class Selection : public sigc::trackable, public PBD::ScopedConnectionList * The Track selection isn't affected when ranges or objects are added. */ - void clear_time(); //clears any time selection ( i.e. Range ) + void clear_time(bool clear_applied_tracks = true); //clears any time selection ( i.e. Range ) void clear_tracks (); //clears the track header selections void clear_objects(); //clears the items listed below