diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2016-05-16 11:08:32 -0400 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2016-05-31 15:30:42 -0400 |
commit | d5127001bb60a8648a277f77e9ae4e8fd5943c9a (patch) | |
tree | 993c959fa7737b1e5e63870928e72e41ae7e5d0a /libs/ardour/stripable.cc | |
parent | 52d4cea712b09cff9536bd5f4c8bb465281480de (diff) |
move ControllableDescriptor from libpbd to libardour; add support for describing VCAs
Diffstat (limited to 'libs/ardour/stripable.cc')
-rw-r--r-- | libs/ardour/stripable.cc | 27 |
1 files changed, 9 insertions, 18 deletions
diff --git a/libs/ardour/stripable.cc b/libs/ardour/stripable.cc index d322fd75de..a9f8b2b01a 100644 --- a/libs/ardour/stripable.cc +++ b/libs/ardour/stripable.cc @@ -43,7 +43,7 @@ Stripable::Stripable (Session& s, string const & name, PresentationInfo const & void Stripable::set_presentation_group_order (PresentationInfo::order_t order, bool notify_class_listeners) { - set_presentation_info_internal (PresentationInfo (order, _presentation_info.flags()), notify_class_listeners); + set_presentation_info (PresentationInfo (order, _presentation_info.flags()), notify_class_listeners); } void @@ -55,16 +55,6 @@ Stripable::set_presentation_group_order_explicit (PresentationInfo::order_t orde void Stripable::set_presentation_info (PresentationInfo pi, bool notify_class_listeners) { - if (Config->get_remote_model() != UserOrdered) { - return; - } - - set_presentation_info_internal (pi, notify_class_listeners); -} - -void -Stripable::set_presentation_info_internal (PresentationInfo pi, bool notify_class_listeners) -{ if (pi != presentation_info()) { DEBUG_TRACE (DEBUG::OrderKeys, string_compose ("%1: set edit-based RID to %2\n", name(), pi)); @@ -88,7 +78,7 @@ Stripable::set_presentation_info_internal (PresentationInfo pi, bool notify_clas void Stripable::set_presentation_info_explicit (PresentationInfo pi) { - set_presentation_info_internal (pi, false); + set_presentation_info (pi, false); } int @@ -99,24 +89,19 @@ Stripable::set_state (XMLNode const& node, int version) XMLNodeConstIterator niter; XMLNode *child; - if (version > 3000) { - - std::cerr << "Looking for PI\n"; + if (version > 3001) { for (niter = nlist.begin(); niter != nlist.end(); ++niter){ child = *niter; if (child->name() == X_("PresentationInfo")) { - std::cerr << "Found it\n"; if ((prop = child->property (X_("value"))) != 0) { _presentation_info = prop->value (); - std::cerr << "Set pinfo to " << _presentation_info << " from " << prop->value() << std::endl; } } } } else { - std::cerr << "Old\n"; /* Older versions of Ardour stored "_flags" as a property of the Route * node, only for 3 special Routes (MasterOut, MonitorOut, Auditioner. @@ -146,6 +131,12 @@ Stripable::set_state (XMLNode const& node, int version) _presentation_info.set_flags (flags); } + + if (!_presentation_info.special()) { + if ((prop = node.property (X_("order-key"))) != 0) { + _presentation_info.set_group_order (atol (prop->value())); + } + } } return 0; |