- if (add) {
- selection->add (pending_keyboard_selection_start, end);
- } else {
- selection->set (0, pending_keyboard_selection_start, end);
- }
+ //if no tracks are selected and we're working from the keyboard, enable all tracks (_something_ has to be selected for any range selection)
+ if ( (_edit_point == EditAtPlayhead) && selection->tracks.empty() )
+ select_all_tracks();
+
+ selection->set (start.sample, end);
+
+ //if session is playing a range, cancel that
+ if (_session->get_play_range())
+ _session->request_cancel_play_range();