From 393d69c7a0b36dfd36d232cc692e31426fe27d00 Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Wed, 8 Jun 2016 11:03:07 -0400 Subject: listen for gui_changed() signal from all Stripables, not just Routes --- gtk2_ardour/editor_routes.cc | 38 ++++++++++++++++++++++---------------- 1 file changed, 22 insertions(+), 16 deletions(-) (limited to 'gtk2_ardour/editor_routes.cc') 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 tavs) boost::weak_ptr 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 (stripable)) { @@ -890,26 +895,27 @@ EditorRoutes::route_removed (TimeAxisView *tv) void EditorRoutes::route_property_changed (const PropertyChange& what_changed, boost::weak_ptr 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 = s.lock (); + boost::shared_ptr 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 ss = (*i)[_columns.stripable]; - if (ss == stripable) { - (*i)[_columns.text] = stripable->name(); - break; + for (i = rows.begin(); i != rows.end(); ++i) { + boost::shared_ptr ss = (*i)[_columns.stripable]; + if (ss == stripable) { + (*i)[_columns.text] = stripable->name(); + break; + } } } } -- cgit v1.2.3