13
0

duplicate routes start off unsoloed to avoid issues related to upstream / downstream buses

This commit is contained in:
Daniel Sheeler 2017-05-28 15:46:22 -05:00
parent b21c4b41a3
commit d67436af3b
3 changed files with 22 additions and 0 deletions

View File

@ -3401,6 +3401,10 @@ Session::new_route_from_template (uint32_t how_many, PresentationInfo::order_t i
}
}
/* new routes start off unsoloed to avoid issues related to
upstream / downstream buses. */
node_copy.remove_node_and_delete(X_("Controllable"), X_("name"), X_("solo"));
boost::shared_ptr<Route> route (XMLRouteFactory (node_copy, 3000));
if (route == 0) {

View File

@ -184,6 +184,8 @@ public:
void remove_nodes_and_delete(const std::string&);
/** Remove and delete all nodes with property prop matching val */
void remove_nodes_and_delete(const std::string& propname, const std::string& val);
/** Remove and delete first node with given name and prop matching val */
void remove_node_and_delete(const std::string& n, const std::string& propname, const std::string& val);
void dump (std::ostream &, std::string p = "") const;

View File

@ -658,6 +658,22 @@ XMLNode::remove_nodes_and_delete(const string& propname, const string& val)
}
}
void
XMLNode::remove_node_and_delete(const string& n, const string& propname,
const string& val)
{
for (XMLNodeIterator i = _children.begin(); i != _children.end(); ++i) {
if ((*i)->name() == n) {
XMLProperty const * prop = (*i)->property (propname);
if (prop && prop->value() == val) {
delete *i;
_children.erase(i);
break;
}
}
}
}
XMLProperty::XMLProperty(const string& n, const string& v)
: _name(n)
, _value(v)