Source List: watch for name-changes in Source entries.

This commit is contained in:
Ben Loftis 2020-07-13 14:31:41 -05:00
parent 16c2df08ae
commit f5bdfb14fd
2 changed files with 9 additions and 3 deletions

View File

@ -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<ARDOUR::Region> region)
}
void
EditorSources::source_changed (boost::shared_ptr<ARDOUR::Region> region)
EditorSources::source_changed (boost::shared_ptr<ARDOUR::Region> 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();

View File

@ -86,7 +86,7 @@ private:
void freeze_tree_model ();
void thaw_tree_model ();
void source_changed (boost::shared_ptr<ARDOUR::Region>);
void source_changed (boost::shared_ptr<ARDOUR::Region>, PBD::PropertyChange const &);
void populate_row (Gtk::TreeModel::Row row, boost::shared_ptr<ARDOUR::Region> region);
void selection_changed ();
@ -129,6 +129,7 @@ private:
Glib::RefPtr<Gtk::TreeStore> _model;
PBD::ScopedConnection source_property_connection;
PBD::ScopedConnection add_source_connection;
PBD::ScopedConnection remove_source_connection;
PBD::ScopedConnectionList remove_region_connections;