13
0

OSC: select comment should feedback when comment changed

This commit is contained in:
Len Ovens 2018-02-17 07:26:23 -08:00
parent 66fa0778ab
commit 08632d623e
3 changed files with 17 additions and 5 deletions

View File

@ -3812,7 +3812,6 @@ OSC::strip_select_group (boost::shared_ptr<Stripable> s, char *group)
rg->set_name (grp);
}
} else {
// nothing to change
return 0;
}
} else {

View File

@ -135,8 +135,13 @@ OSCSelectObserver::refresh_strip (boost::shared_ptr<ARDOUR::Stripable> new_strip
name_changed (ARDOUR::Properties::name);
boost::shared_ptr<Route> rt = boost::dynamic_pointer_cast<Route> (_strip);
rt->route_group_changed.connect (strip_connections, MISSING_INVALIDATOR, boost::bind (&OSCSelectObserver::group_name, this), OSC::instance());
group_name ();
if (rt) {
rt->route_group_changed.connect (strip_connections, MISSING_INVALIDATOR, boost::bind (&OSCSelectObserver::group_name, this), OSC::instance());
group_name ();
rt->comment_changed.connect (strip_connections, MISSING_INVALIDATOR, boost::bind (&OSCSelectObserver::comment_changed, this), OSC::instance());
comment_changed ();
}
_strip->presentation_info().PropertyChanged.connect (strip_connections, MISSING_INVALIDATOR, boost::bind (&OSCSelectObserver::pi_changed, this, _1), OSC::instance());
_osc.float_message (X_("/select/hide"), _strip->is_hidden (), addr);
@ -639,8 +644,6 @@ OSCSelectObserver::name_changed (const PBD::PropertyChange& what_changed)
_osc.text_message (X_("/select/name"), _strip->name(), addr);
boost::shared_ptr<Route> route = boost::dynamic_pointer_cast<Route> (_strip);
if (route) {
//spit out the comment at the same time
_osc.text_message (X_("/select/comment"), route->comment(), addr);
// lets tell the surface how many inputs this strip has
_osc.float_message (X_("/select/n_inputs"), (float) route->n_inputs().n_total(), addr);
// lets tell the surface how many outputs this strip has
@ -661,6 +664,15 @@ OSCSelectObserver::group_name ()
}
}
void
OSCSelectObserver::comment_changed ()
{
boost::shared_ptr<Route> rt = boost::dynamic_pointer_cast<Route> (_strip);
if (rt) {
_osc.text_message (X_("/select/comment"), rt->comment(), addr);
}
}
void
OSCSelectObserver::pi_changed (PBD::PropertyChange const& what_changed)
{

View File

@ -97,6 +97,7 @@ class OSCSelectObserver
void name_changed (const PBD::PropertyChange& what_changed);
void group_name ();
void comment_changed ();
void pi_changed (PBD::PropertyChange const&);
void change_message (std::string path, boost::shared_ptr<PBD::Controllable> controllable);
void enable_message (std::string path, boost::shared_ptr<PBD::Controllable> controllable);