diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2016-06-08 11:03:07 -0400 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2016-06-08 11:03:13 -0400 |
commit | 393d69c7a0b36dfd36d232cc692e31426fe27d00 (patch) | |
tree | 74fb6afcdab7c3f0ecaf9692b10a191b5e47f5c1 | |
parent | 4a863cb1d6823cd98585d2dd740b78b3c0af8c96 (diff) |
listen for gui_changed() signal from all Stripables, not just Routes
-rw-r--r-- | gtk2_ardour/editor_routes.cc | 38 |
1 files changed, 22 insertions, 16 deletions
diff --git a/gtk2_ardour/editor_routes.cc b/gtk2_ardour/editor_routes.cc index dcb9d30209..dc41492dfd 100644 --- a/gtk2_ardour/editor_routes.cc +++ b/gtk2_ardour/editor_routes.cc @@ -792,9 +792,14 @@ EditorRoutes::time_axis_views_added (list<TimeAxisView*> tavs) boost::weak_ptr<Stripable> ws (stripable); - if (rtav) { - rtav->route()->gui_changed.connect (*this, MISSING_INVALIDATOR, boost::bind (&EditorRoutes::handle_gui_changes, this, _1, _2), gui_context()); - } + /* for now, we need both of these. PropertyChanged covers on + * pre-defined, "global" things of interest to a + * UI. gui_changed covers arbitrary, un-enumerated, un-typed + * changes that may only be of interest to a particular + * UI (e.g. track-height is not of any relevant to OSC) + */ + + stripable->gui_changed.connect (*this, MISSING_INVALIDATOR, boost::bind (&EditorRoutes::handle_gui_changes, this, _1, _2), gui_context()); stripable->PropertyChanged.connect (*this, MISSING_INVALIDATOR, boost::bind (&EditorRoutes::route_property_changed, this, _1, ws), gui_context()); if (boost::dynamic_pointer_cast<Track> (stripable)) { @@ -890,26 +895,27 @@ EditorRoutes::route_removed (TimeAxisView *tv) void EditorRoutes::route_property_changed (const PropertyChange& what_changed, boost::weak_ptr<Stripable> s) { - if (!what_changed.contains (ARDOUR::Properties::name)) { + if (_adding_routes) { return; } - ENSURE_GUI_THREAD (*this, &EditorRoutes::route_name_changed, r) + if (what_changed.contains (ARDOUR::Properties::name)) { - boost::shared_ptr<Stripable> stripable = s.lock (); + boost::shared_ptr<Stripable> stripable = s.lock (); - if (!stripable) { - return; - } + if (!stripable) { + return; + } - TreeModel::Children rows = _model->children(); - TreeModel::Children::iterator i; + TreeModel::Children rows = _model->children(); + TreeModel::Children::iterator i; - for (i = rows.begin(); i != rows.end(); ++i) { - boost::shared_ptr<Stripable> ss = (*i)[_columns.stripable]; - if (ss == stripable) { - (*i)[_columns.text] = stripable->name(); - break; + for (i = rows.begin(); i != rows.end(); ++i) { + boost::shared_ptr<Stripable> ss = (*i)[_columns.stripable]; + if (ss == stripable) { + (*i)[_columns.text] = stripable->name(); + break; + } } } } |