cut buffer must not mess around with libardour selection

Fixes range mode selection/cut/copy that would previously clear track selection
This commit is contained in:
Paul Davis 2017-06-07 12:14:44 -04:00
parent ca815acd61
commit 6ac76734f5
3 changed files with 10 additions and 4 deletions

View File

@ -390,8 +390,8 @@ Editor::Editor ()
, _visible_track_count (-1) , _visible_track_count (-1)
, toolbar_selection_clock_table (2,3) , toolbar_selection_clock_table (2,3)
, automation_mode_button (_("mode")) , automation_mode_button (_("mode"))
, selection (new Selection (this)) , selection (new Selection (this, true))
, cut_buffer (new Selection (this)) , cut_buffer (new Selection (this, false))
, _selection_memento (new SelectionMemento()) , _selection_memento (new SelectionMemento())
, _all_region_actions_sensitized (false) , _all_region_actions_sensitized (false)
, _ignore_region_action (false) , _ignore_region_action (false)

View File

@ -57,10 +57,11 @@ struct AudioRangeComparator {
} }
}; };
Selection::Selection (const PublicEditor* e) Selection::Selection (const PublicEditor* e, bool mls)
: tracks (e) : tracks (e)
, editor (e) , editor (e)
, next_time_id (0) , next_time_id (0)
, manage_libardour_selection (mls)
{ {
clear (); clear ();
@ -1544,6 +1545,10 @@ Selection::set (const TrackViewList& track_list)
void void
Selection::clear_tracks (bool) Selection::clear_tracks (bool)
{ {
if (!manage_libardour_selection) {
return;
}
Session* s = editor->session(); Session* s = editor->session();
if (s) { if (s) {
CoreSelection& selection (s->selection()); CoreSelection& selection (s->selection());

View File

@ -90,7 +90,7 @@ class Selection : public sigc::trackable, public PBD::ScopedConnectionList
/** only used when this class is used as a cut buffer */ /** only used when this class is used as a cut buffer */
MidiNoteSelection midi_notes; MidiNoteSelection midi_notes;
Selection (PublicEditor const * e); Selection (PublicEditor const * e, bool manage_libardour_selection);
// Selection& operator= (const Selection& other); // Selection& operator= (const Selection& other);
@ -230,6 +230,7 @@ class Selection : public sigc::trackable, public PBD::ScopedConnectionList
private: private:
PublicEditor const * editor; PublicEditor const * editor;
uint32_t next_time_id; uint32_t next_time_id;
bool manage_libardour_selection;
TrackViewList add_grouped_tracks (TrackViewList const & t); TrackViewList add_grouped_tracks (TrackViewList const & t);
}; };