diff options
author | Ben Loftis <ben@harrisonconsoles.com> | 2019-07-30 13:43:14 -0500 |
---|---|---|
committer | Ben Loftis <ben@harrisonconsoles.com> | 2019-08-01 12:11:31 -0500 |
commit | d400dd813af4731e72dcd997f8332924c2b45c0f (patch) | |
tree | 6d147af2302c37d85989c0b241feeb28fa0430be /gtk2_ardour/editor_sources.cc | |
parent | 595959abf7256655a25e30b8b03474df05a3493f (diff) |
(Source List) Handle Session::RemoveSource
Diffstat (limited to 'gtk2_ardour/editor_sources.cc')
-rw-r--r-- | gtk2_ardour/editor_sources.cc | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/gtk2_ardour/editor_sources.cc b/gtk2_ardour/editor_sources.cc index fdd897b41c..676e3eb0e6 100644 --- a/gtk2_ardour/editor_sources.cc +++ b/gtk2_ardour/editor_sources.cc @@ -266,10 +266,12 @@ EditorSources::set_session (ARDOUR::Session* s) if (s) { /* Currently, none of the displayed properties are mutable, so there is no reason to register for changes - * ARDOUR::Region::RegionPropertyChanged.connect (region_property_connection, MISSING_INVALIDATOR, boost::bind (&EditorSources::source_changed, this, _1, _2), gui_context()); + * ARDOUR::Region::RegionPropertyChanged.connect (source_property_connection, MISSING_INVALIDATOR, boost::bind (&EditorSources::source_changed, this, _1, _2), gui_context()); */ - ARDOUR::RegionFactory::CheckNewRegion.connect (check_new_region_connection, MISSING_INVALIDATOR, boost::bind (&EditorSources::add_source, this, _1), gui_context()); + 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()); redisplay(); @@ -279,13 +281,13 @@ EditorSources::set_session (ARDOUR::Session* s) } void -EditorSources::remove_source (boost::shared_ptr<ARDOUR::Region> region) +EditorSources::remove_source (boost::shared_ptr<ARDOUR::Source> source) { TreeModel::iterator i; TreeModel::Children rows = _model->children(); for (i = rows.begin(); i != rows.end(); ++i) { boost::shared_ptr<ARDOUR::Region> rr = (*i)[_columns.region]; - if (region == rr) { + if (rr->source() == source) { _model->erase(i); break; } |