diff options
author | David Robillard <d@drobilla.net> | 2006-07-05 19:47:25 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2006-07-05 19:47:25 +0000 |
commit | 22c20ab6f215c0ab24702a479aa6821c25a7d058 (patch) | |
tree | 3f606773d2082fd3f28857e1c1ef876d2e007559 /gtk2_ardour/audio_time_axis.cc | |
parent | 5dc4abef7951c1a1b85fb6b9dbb194d73b8c4c2b (diff) |
Merged with trunk, and a few trivial GUI updates etc.
git-svn-id: svn://localhost/ardour2/branches/midi@664 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/audio_time_axis.cc')
-rw-r--r-- | gtk2_ardour/audio_time_axis.cc | 23 |
1 files changed, 14 insertions, 9 deletions
diff --git a/gtk2_ardour/audio_time_axis.cc b/gtk2_ardour/audio_time_axis.cc index c2fbc45a84..f7c9093fe7 100644 --- a/gtk2_ardour/audio_time_axis.cc +++ b/gtk2_ardour/audio_time_axis.cc @@ -241,7 +241,6 @@ AudioTimeAxisView::AudioTimeAxisView (PublicEditor& ed, Session& sess, Route& rt map_frozen (); } else { - /* bus */ controls_ebox.set_name ("BusControlsBaseUnselected"); @@ -826,7 +825,7 @@ AudioTimeAxisView::rename_current_playlist () AudioPlaylist *pl; AudioDiskstream *ds; - if (((ds = get_diskstream()) == 0) || ds->destructive() + if (((ds = dynamic_cast<AudioDiskstream*>(get_diskstream())) == 0) || ds->destructive() || ((pl = dynamic_cast<AudioPlaylist*>(ds->playlist())) == 0)) { return; } @@ -856,7 +855,7 @@ AudioTimeAxisView::use_copy_playlist (bool prompt) AudioDiskstream *ds; string name; - if (((ds = get_diskstream()) == 0) || ds->destructive() + if (((ds = dynamic_cast<AudioDiskstream*>(get_diskstream())) == 0) || ds->destructive() || ((pl = dynamic_cast<AudioPlaylist*>(ds->playlist())) == 0)) { return; } @@ -897,7 +896,7 @@ AudioTimeAxisView::use_new_playlist (bool prompt) AudioDiskstream *ds; string name; - if (((ds = get_diskstream()) == 0) || ds->destructive() + if (((ds = dynamic_cast<AudioDiskstream*>(get_diskstream())) == 0) || ds->destructive() || ((pl = dynamic_cast<AudioPlaylist*>(ds->playlist())) == 0)) { return; } @@ -936,7 +935,7 @@ AudioTimeAxisView::clear_playlist () AudioPlaylist *pl; AudioDiskstream *ds; - if ((ds = get_diskstream()) != 0) { + if ((ds = dynamic_cast<AudioDiskstream*>(get_diskstream())) != 0) { if ((pl = dynamic_cast<AudioPlaylist*>(ds->playlist())) != 0) { editor.clear_playlist (*pl); } @@ -994,7 +993,7 @@ AudioTimeAxisView::update_diskstream_display () { AudioDiskstream *ds; - if ((ds = get_diskstream()) != 0) { + if ((ds = dynamic_cast<AudioDiskstream*>(get_diskstream())) != 0) { set_playlist (dynamic_cast<AudioPlaylist*> (ds->playlist ())); } @@ -1096,7 +1095,7 @@ AudioTimeAxisView::name() const Playlist * AudioTimeAxisView::playlist () const { - AudioDiskstream *ds; + Diskstream *ds; if ((ds = get_diskstream()) != 0) { return ds->playlist(); @@ -1143,10 +1142,16 @@ AudioTimeAxisView::hide_click () editor.hide_track_in_display (*this); } +ARDOUR::AudioDiskstream* +AudioTimeAxisView::get_diskstream() const +{ + return dynamic_cast<ARDOUR::AudioDiskstream*>(RouteUI::get_diskstream()); +} + Region* AudioTimeAxisView::find_next_region (jack_nframes_t pos, RegionPoint point, int32_t dir) { - AudioDiskstream *stream; + Diskstream *stream; Playlist *playlist; if ((stream = get_diskstream()) != 0 && (playlist = stream->playlist()) != 0) { @@ -1721,7 +1726,7 @@ bool AudioTimeAxisView::cut_copy_clear (Selection& selection, CutCopyOp op) { Playlist* what_we_got; - AudioDiskstream* ds = get_diskstream(); + AudioDiskstream* ds = dynamic_cast<AudioDiskstream*>(get_diskstream()); Playlist* playlist; bool ret = false; |