mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-28 09:27:39 +01:00
only add vca or group state IFF it has not been added before
This commit is contained in:
parent
54cd8e6368
commit
3160904a5e
1 changed files with 21 additions and 2 deletions
|
|
@ -158,7 +158,17 @@ void MixerSnapshot::snap(boost::shared_ptr<Route> route)
|
|||
if(group) {
|
||||
XMLNode* group_node = copy.add_child(X_("Group"));
|
||||
group_node->set_property(X_("name"), group->name());
|
||||
snap(group);
|
||||
|
||||
bool need_to_be_made = true;
|
||||
for(vector<State>::const_iterator it = group_states.begin(); it != group_states.end(); it++) {
|
||||
if((*it).name == group->name()) {
|
||||
need_to_be_made = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if(need_to_be_made) {
|
||||
snap(group);
|
||||
}
|
||||
}
|
||||
|
||||
XMLNode* slavable = find_named_node(copy, "Slavable");
|
||||
|
|
@ -173,9 +183,18 @@ void MixerSnapshot::snap(boost::shared_ptr<Route> route)
|
|||
boost::shared_ptr<VCA> vca = _session->vca_manager().vca_by_number(i);
|
||||
|
||||
if(vca) {
|
||||
bool need_to_be_made = true;
|
||||
for(vector<State>::const_iterator it = vca_states.begin(); it != vca_states.end(); it++) {
|
||||
if((*it).name == vca->name()) {
|
||||
need_to_be_made = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if(need_to_be_made) {
|
||||
snap(vca);
|
||||
}
|
||||
//we will need this for later recollection
|
||||
(*niter)->set_property(X_("name"), vca->name());
|
||||
snap(vca);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue