diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2006-03-05 19:39:16 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2006-03-05 19:39:16 +0000 |
commit | 5a39bf595c737dbb36666a9e718ac267e9131380 (patch) | |
tree | 12219a08eec7305a135eafff4210a037ff5f8804 /gtk2_ardour/audio_time_axis.cc | |
parent | caeb564748e7ece1025f55f005fe5591795ec234 (diff) |
export range markers patch (revisited), change selection model, copy-drag tempo+meter marker patch
git-svn-id: svn://localhost/trunk/ardour2@349 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/audio_time_axis.cc')
-rw-r--r-- | gtk2_ardour/audio_time_axis.cc | 43 |
1 files changed, 26 insertions, 17 deletions
diff --git a/gtk2_ardour/audio_time_axis.cc b/gtk2_ardour/audio_time_axis.cc index 0c0c402934..88a0f5eb57 100644 --- a/gtk2_ardour/audio_time_axis.cc +++ b/gtk2_ardour/audio_time_axis.cc @@ -832,6 +832,11 @@ AudioTimeAxisView::rename_current_playlist () AudioPlaylist *pl; DiskStream *ds; + /* neither conditions are supposed to be true at this + time, but to leave the design flexible, allow + them to be in the future without causing crashes + */ + if (((ds = get_diskstream()) == 0) ||((pl = ds->playlist()) == 0)) { return; } @@ -853,22 +858,17 @@ AudioTimeAxisView::rename_current_playlist () } void -AudioTimeAxisView::playlist_selected (AudioPlaylist *pl) -{ - DiskStream *ds; - - if ((ds = get_diskstream()) != 0) { - ds->use_playlist (pl); - } -} - -void AudioTimeAxisView::use_copy_playlist () { AudioPlaylist *pl; DiskStream *ds; string name; + /* neither conditions are supposed to be true at this + time, but to leave the design flexible, allow + them to be in the future without causing crashes + */ + if (((ds = get_diskstream()) == 0) || ((pl = ds->playlist()) == 0)) { return; } @@ -902,6 +902,11 @@ AudioTimeAxisView::use_new_playlist () DiskStream *ds; string name; + /* neither conditions are supposed to be true at this + time, but to leave the design flexible, allow + them to be in the future without causing crashes + */ + if (((ds = get_diskstream()) == 0) || ((pl = ds->playlist()) == 0)) { return; } @@ -1003,14 +1008,18 @@ AudioTimeAxisView::selection_click (GdkEventButton* ev) { PublicEditor::TrackViewList* tracks = editor.get_valid_views (this, _route.edit_group()); - if (Keyboard::modifier_state_contains (ev->state, Keyboard::Shift)) { - if (editor.get_selection().selected (this)) { - editor.get_selection().remove (*tracks); - } else { - editor.get_selection().add (*tracks); - } - } else { + switch (Keyboard::selection_type (ev->state)) { + case Selection::Toggle: + editor.get_selection().toggle (*tracks); + break; + + case Selection::Set: editor.get_selection().set (*tracks); + break; + + case Selection::Extend: + /* not defined yet */ + break; } delete tracks; |