diff --git a/gtk2_ardour/editor_sources.cc b/gtk2_ardour/editor_sources.cc index 5b33876283..eecc26f53f 100644 --- a/gtk2_ardour/editor_sources.cc +++ b/gtk2_ardour/editor_sources.cc @@ -282,6 +282,8 @@ EditorSources::set_session (ARDOUR::Session* s) SessionHandlePtr::set_session (s); if (s) { + ARDOUR::Region::RegionPropertyChanged.connect (source_property_connection, MISSING_INVALIDATOR, boost::bind (&EditorSources::source_changed, this, _1, _2), 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_weak_source, this, _1), gui_context()); @@ -459,9 +461,12 @@ EditorSources::add_source (boost::shared_ptr region) } void -EditorSources::source_changed (boost::shared_ptr region) +EditorSources::source_changed (boost::shared_ptr region, PBD::PropertyChange const &) { - /* Currently never reached .. we have no mutable properties shown in the list*/ + if ( !region->whole_file() ) { + /*this isn't on our list anyway; we can ignore it*/ + return; + } TreeModel::iterator i; TreeModel::Children rows = _model->children(); diff --git a/gtk2_ardour/editor_sources.h b/gtk2_ardour/editor_sources.h index 95c5109227..59647d8f36 100644 --- a/gtk2_ardour/editor_sources.h +++ b/gtk2_ardour/editor_sources.h @@ -86,7 +86,7 @@ private: void freeze_tree_model (); void thaw_tree_model (); - void source_changed (boost::shared_ptr); + void source_changed (boost::shared_ptr, PBD::PropertyChange const &); void populate_row (Gtk::TreeModel::Row row, boost::shared_ptr region); void selection_changed (); @@ -129,6 +129,7 @@ private: Glib::RefPtr _model; + PBD::ScopedConnection source_property_connection; PBD::ScopedConnection add_source_connection; PBD::ScopedConnection remove_source_connection; PBD::ScopedConnectionList remove_region_connections;