ARDOUR::RegionFactory::CheckNewRegion.connect (add_source_connection, MISSING_INVALIDATOR, boost::bind (&EditorSources::add_source, this, _1), gui_context());
- s->SourceRemoved.connect (remove_source_connection, MISSING_INVALIDATOR, boost::bind (&EditorSources::remove_source, this, _1), gui_context());
+ s->SourceRemoved.connect (remove_source_connection, MISSING_INVALIDATOR, boost::bind (&EditorSources::remove_weak_source, this, _1), gui_context());
redisplay();
}
}
+void
+EditorSources::remove_weak_source (boost::weak_ptr<ARDOUR::Source> src)
+{
+ boost::shared_ptr<ARDOUR::Source> source = src.lock();
+ if (source) {
+ remove_source (source);
+ }
+}
+
void
EditorSources::remove_source (boost::shared_ptr<ARDOUR::Source> source)
{
void add_source (boost::shared_ptr<ARDOUR::Region>);
void remove_source (boost::shared_ptr<ARDOUR::Source>);
+ void remove_weak_source (boost::weak_ptr<ARDOUR::Source>);
void clock_format_changed ();