diff options
author | Carl Hetherington <carl@carlh.net> | 2011-05-23 10:03:14 +0000 |
---|---|---|
committer | Carl Hetherington <carl@carlh.net> | 2011-05-23 10:03:14 +0000 |
commit | 32df6209384bf99a04b2e1e227e325700bc45eed (patch) | |
tree | d5a671e0b84ae218847f4d4fe9581cf32b8a0d8c /gtk2_ardour/automation_time_axis.cc | |
parent | 09d4ab251e604c166cedad8fa0564bb175bc335d (diff) |
Fix a few missing drops of Route references.
git-svn-id: svn://localhost/ardour2/branches/3.0@9571 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/automation_time_axis.cc')
-rw-r--r-- | gtk2_ardour/automation_time_axis.cc | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/gtk2_ardour/automation_time_axis.cc b/gtk2_ardour/automation_time_axis.cc index a92ac38530..9cf1598010 100644 --- a/gtk2_ardour/automation_time_axis.cc +++ b/gtk2_ardour/automation_time_axis.cc @@ -245,6 +245,10 @@ AutomationTimeAxisView::AutomationTimeAxisView ( automation_state_changed (); ColorsChanged.connect (sigc::mem_fun (*this, &AutomationTimeAxisView::color_handler)); + + _route->DropReferences.connect ( + _route_connections, invalidator (*this), ui_bind (&AutomationTimeAxisView::route_going_away, this), gui_context () + ); } AutomationTimeAxisView::~AutomationTimeAxisView () @@ -252,6 +256,12 @@ AutomationTimeAxisView::~AutomationTimeAxisView () } void +AutomationTimeAxisView::route_going_away () +{ + _route.reset (); +} + +void AutomationTimeAxisView::auto_clicked () { using namespace Menu_Helpers; @@ -492,7 +502,7 @@ AutomationTimeAxisView::set_height (uint32_t h) } if (changed) { - if (canvas_item_visible (_canvas_display)) { + if (canvas_item_visible (_canvas_display) && _route) { /* only emit the signal if the height really changed and we were visible */ _route->gui_changed ("visible_tracks", (void *) 0); /* EMIT_SIGNAL */ } |