summaryrefslogtreecommitdiff
path: root/gtk2_ardour
diff options
context:
space:
mode:
authorCarl Hetherington <carl@carlh.net>2011-05-23 10:03:14 +0000
committerCarl Hetherington <carl@carlh.net>2011-05-23 10:03:14 +0000
commit32df6209384bf99a04b2e1e227e325700bc45eed (patch)
treed5a671e0b84ae218847f4d4fe9581cf32b8a0d8c /gtk2_ardour
parent09d4ab251e604c166cedad8fa0564bb175bc335d (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')
-rw-r--r--gtk2_ardour/automation_time_axis.cc12
-rw-r--r--gtk2_ardour/automation_time_axis.h2
-rw-r--r--gtk2_ardour/processor_box.cc1
3 files changed, 14 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 */
}
diff --git a/gtk2_ardour/automation_time_axis.h b/gtk2_ardour/automation_time_axis.h
index 7fc9c2575a..d1a465238a 100644
--- a/gtk2_ardour/automation_time_axis.h
+++ b/gtk2_ardour/automation_time_axis.h
@@ -168,6 +168,7 @@ class AutomationTimeAxisView : public TimeAxisView {
void cut_copy_clear_objects_one (AutomationLine&, PointSelection&, Editing::CutCopyOp);
bool paste_one (AutomationLine&, ARDOUR::framepos_t, float times, Selection&, size_t nth);
void reset_objects_one (AutomationLine&, PointSelection&);
+ void route_going_away ();
void set_automation_state (ARDOUR::AutoState);
bool ignore_state_request;
@@ -178,6 +179,7 @@ class AutomationTimeAxisView : public TimeAxisView {
void interpolation_changed (ARDOUR::AutomationList::InterpolationStyle);
PBD::ScopedConnectionList _list_connections;
+ PBD::ScopedConnectionList _route_connections;
void update_extra_xml_shown (bool editor_shown);
diff --git a/gtk2_ardour/processor_box.cc b/gtk2_ardour/processor_box.cc
index 7ae9ddf16f..63a78260ae 100644
--- a/gtk2_ardour/processor_box.cc
+++ b/gtk2_ardour/processor_box.cc
@@ -527,6 +527,7 @@ ProcessorBox::route_going_away ()
{
/* don't keep updating display as processors are deleted */
no_processor_redisplay = true;
+ _route.reset ();
}
void