diff options
author | Carl Hetherington <carl@carlh.net> | 2010-04-02 00:21:08 +0000 |
---|---|---|
committer | Carl Hetherington <carl@carlh.net> | 2010-04-02 00:21:08 +0000 |
commit | b68256a8ff670d0f9206858daa69e1bdf7810684 (patch) | |
tree | a29890adce503a5aa0c433f068479d7bdc2d9a4c /libs/ardour/route_group.cc | |
parent | 0fc44fc2f1b9d9706e67abe8a41c70ca3231af60 (diff) |
Fix up route group state signal handling. Make the PropertyList version
of Stateful::set_properties emit a changed signal after it has done its work.
git-svn-id: svn://localhost/ardour2/branches/3.0@6826 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/route_group.cc')
-rw-r--r-- | libs/ardour/route_group.cc | 32 |
1 files changed, 7 insertions, 25 deletions
diff --git a/libs/ardour/route_group.cc b/libs/ardour/route_group.cc index 3e9ffe16d6..f0a9125770 100644 --- a/libs/ardour/route_group.cc +++ b/libs/ardour/route_group.cc @@ -92,7 +92,7 @@ RouteGroup::RouteGroup (Session& s, const string &n) , routes (new RouteList) , ROUTE_GROUP_DEFAULT_PROPERTIES { - _xml_node_name = X_("RegionGroup"); + _xml_node_name = X_("RouteGroup"); add_property (_relative); add_property (_active); @@ -135,7 +135,7 @@ RouteGroup::add (boost::shared_ptr<Route> r) r->DropReferences.connect_same_thread (*this, boost::bind (&RouteGroup::remove_when_going_away, this, boost::weak_ptr<Route> (r))); _session.set_dirty (); - changed (); /* EMIT SIGNAL */ + MembershipChanged (); /* EMIT SIGNAL */ return 0; } @@ -158,7 +158,7 @@ RouteGroup::remove (boost::shared_ptr<Route> r) r->leave_route_group (); routes->erase (i); _session.set_dirty (); - changed (); /* EMIT SIGNAL */ + MembershipChanged (); /* EMIT SIGNAL */ return 0; } @@ -339,7 +339,6 @@ RouteGroup::set_active (bool yn, void *src) } _active = yn; _session.set_dirty (); - FlagsChanged (src); /* EMIT SIGNAL */ } void @@ -351,7 +350,6 @@ RouteGroup::set_relative (bool yn, void *src) } _relative = yn; _session.set_dirty (); - FlagsChanged (src); /* EMIT SIGNAL */ } void @@ -372,7 +370,6 @@ RouteGroup::set_hidden (bool yn, void *src) } } _session.set_dirty (); - FlagsChanged (src); /* EMIT SIGNAL */ } void @@ -442,25 +439,10 @@ RouteGroup::destroy_subgroup () bool RouteGroup::enabled_property (PBD::PropertyID prop) { - if (Properties::relative.property_id == prop) { - return is_relative(); - } else if (Properties::active.property_id == prop) { - return is_active(); - } else if (Properties::hidden.property_id == prop) { - return is_hidden(); - } else if (Properties::gain.property_id == prop) { - return is_gain(); - } else if (Properties::mute.property_id == prop) { - return is_mute(); - } else if (Properties::solo.property_id == prop) { - return is_solo(); - } else if (Properties::recenable.property_id == prop) { - return is_recenable(); - } else if (Properties::select.property_id == prop) { - return is_select(); - } else if (Properties::edit.property_id == prop) { - return is_edit(); + OwnedPropertyList::iterator i = _properties->find (prop); + if (i == _properties->end()) { + return false; } - return false; + return dynamic_cast<const PropertyTemplate<bool>* > (i->second)->val (); } |