diff options
author | Carl Hetherington <carl@carlh.net> | 2009-07-09 13:39:45 +0000 |
---|---|---|
committer | Carl Hetherington <carl@carlh.net> | 2009-07-09 13:39:45 +0000 |
commit | 4297071b3f7360b17d81ef9cf36b8d75d46d2818 (patch) | |
tree | 13cbb169cfcf79a2e845d8860f0f98e192f3a8d3 /gtk2_ardour/editor_mixer.cc | |
parent | 0f8031da06e131595b3625169f9687c1a1ab2f3a (diff) |
Use shared_ptr for the TimeAxisView hierarchy.
git-svn-id: svn://localhost/ardour2/branches/3.0@5339 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/editor_mixer.cc')
-rw-r--r-- | gtk2_ardour/editor_mixer.cc | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/gtk2_ardour/editor_mixer.cc b/gtk2_ardour/editor_mixer.cc index 46b05a20f4..c7fc927653 100644 --- a/gtk2_ardour/editor_mixer.cc +++ b/gtk2_ardour/editor_mixer.cc @@ -89,9 +89,9 @@ Editor::show_editor_mixer (bool yn) } for (TrackViewList::iterator i = track_views.begin(); i != track_views.end(); ++i) { - RouteTimeAxisView* atv; + RouteTimeAxisViewPtr atv; - if ((atv = dynamic_cast<RouteTimeAxisView*> (*i)) != 0) { + if ((atv = boost::dynamic_pointer_cast<RouteTimeAxisView> (*i)) != 0) { r = atv->route(); break; } @@ -101,9 +101,9 @@ Editor::show_editor_mixer (bool yn) sort_track_selection (); for (TrackSelection::iterator i = selection->tracks.begin(); i != selection->tracks.end(); ++i) { - RouteTimeAxisView* atv; + RouteTimeAxisViewPtr atv; - if ((atv = dynamic_cast<RouteTimeAxisView*> (*i)) != 0) { + if ((atv = boost::dynamic_pointer_cast<RouteTimeAxisView> (*i)) != 0) { r = atv->route(); break; } @@ -183,12 +183,12 @@ Editor::create_editor_mixer () } void -Editor::set_selected_mixer_strip (TimeAxisView& view) +Editor::set_selected_mixer_strip (TimeAxisViewPtr view) { - RouteTimeAxisView* at; + RouteTimeAxisViewPtr at; bool created; - if (!session || (at = dynamic_cast<RouteTimeAxisView*>(&view)) == 0) { + if (!session || (at = boost::dynamic_pointer_cast<RouteTimeAxisView> (view)) == 0) { return; } @@ -323,9 +323,9 @@ Editor::current_mixer_strip_hidden () { for (TrackViewList::iterator i = track_views.begin(); i != track_views.end(); ++i) { - RouteTimeAxisView* tmp; + RouteTimeAxisViewPtr tmp; - if ((tmp = dynamic_cast<RouteTimeAxisView*>(*i)) != 0) { + if ((tmp = boost::dynamic_pointer_cast<RouteTimeAxisView> (*i)) != 0) { if (tmp->route() == current_mixer_strip->route()) { (*i)->set_selected (false); break; @@ -354,11 +354,11 @@ Editor::session_going_away () cut_buffer->clear (); clicked_regionview = 0; - clicked_axisview = 0; - clicked_routeview = 0; + clicked_axisview.reset (); + clicked_routeview.reset (); clicked_crossfadeview = 0; entered_regionview = 0; - entered_track = 0; + entered_track.reset (); last_update_frame = 0; _drag = 0; |