X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=libs%2Fardour%2Fstripable.cc;h=2a86ef252932d9052b285b5933dea4a6f335a20a;hb=4bdbe77414b956e27f2c1631e67189c70409a3d1;hp=a9f8b2b01ac657fb1bf9a324fa2fe353f2529784;hpb=d5127001bb60a8648a277f77e9ae4e8fd5943c9a;p=ardour.git diff --git a/libs/ardour/stripable.cc b/libs/ardour/stripable.cc index a9f8b2b01a..2a86ef2529 100644 --- a/libs/ardour/stripable.cc +++ b/libs/ardour/stripable.cc @@ -32,8 +32,6 @@ using namespace ARDOUR; using namespace PBD; using std::string; -PBD::Signal0 Stripable::PresentationInfoChange; - Stripable::Stripable (Session& s, string const & name, PresentationInfo const & pi) : SessionObject (s, name) , _presentation_info (pi) @@ -41,44 +39,19 @@ 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 (PresentationInfo (order, _presentation_info.flags()), notify_class_listeners); -} - -void -Stripable::set_presentation_group_order_explicit (PresentationInfo::order_t order) -{ - set_presentation_group_order (order, false); -} - -void -Stripable::set_presentation_info (PresentationInfo pi, bool notify_class_listeners) +Stripable::set_presentation_order (PresentationInfo::order_t order, bool notify_class_listeners) { - if (pi != presentation_info()) { + _presentation_info.set_order (order); - DEBUG_TRACE (DEBUG::OrderKeys, string_compose ("%1: set edit-based RID to %2\n", name(), pi)); - - if (is_master()) { - _presentation_info = PresentationInfo (0, PresentationInfo::MasterOut); - } else if (is_monitor()) { - _presentation_info = PresentationInfo (0, PresentationInfo::MonitorOut); - } else { - _presentation_info = pi; - } - - PresentationInfoChanged (); - - if (notify_class_listeners) { - PresentationInfoChange (); - } + if (notify_class_listeners) { + PresentationInfo::Change (); } } void -Stripable::set_presentation_info_explicit (PresentationInfo pi) +Stripable::set_presentation_order_explicit (PresentationInfo::order_t order) { - set_presentation_info (pi, false); + _presentation_info.set_order (order); } int @@ -94,10 +67,8 @@ Stripable::set_state (XMLNode const& node, int version) for (niter = nlist.begin(); niter != nlist.end(); ++niter){ child = *niter; - if (child->name() == X_("PresentationInfo")) { - if ((prop = child->property (X_("value"))) != 0) { - _presentation_info = prop->value (); - } + if (child->name() == PresentationInfo::state_node_name) { + _presentation_info.set_state (*child, version); } } @@ -134,18 +105,10 @@ Stripable::set_state (XMLNode const& node, int version) if (!_presentation_info.special()) { if ((prop = node.property (X_("order-key"))) != 0) { - _presentation_info.set_group_order (atol (prop->value())); + _presentation_info.set_order (atol (prop->value())); } } } return 0; } - -void -Stripable::add_state (XMLNode& node) const -{ - XMLNode* remote_control_node = new XMLNode (X_("PresentationInfo")); - remote_control_node->add_property (X_("value"), _presentation_info.to_string()); - node.add_child_nocopy (*remote_control_node); -}