diff --git a/gtk2_ardour/mixer_snapshot_substitution_dialog.cc b/gtk2_ardour/mixer_snapshot_substitution_dialog.cc index 359fc83951..8c71b1bbd9 100644 --- a/gtk2_ardour/mixer_snapshot_substitution_dialog.cc +++ b/gtk2_ardour/mixer_snapshot_substitution_dialog.cc @@ -139,15 +139,15 @@ void MixerSnapshotSubstitutionDialog::on_response(int r) if(route_name != subst_name) { if(route_state_exists && subst_state_exists) { XMLNode copy (get_state_by_name(subst_name).node); - sanitize_node(copy, route_name); state.node = copy; + state.name = route_name; } //state did *not* exist, make it and add the substitute node if(!route_state_exists && subst_state_exists) { //copy the substitute node XMLNode copy (get_state_by_name(subst_name).node); - sanitize_node(copy, route_name); + MixerSnapshot::State s { "", route_name, @@ -179,7 +179,7 @@ void MixerSnapshotSubstitutionDialog::on_response(int r) for(vector::iterator s = dirty.begin(); s != dirty.end(); s++) { cout << (*s).name << endl; } - + substitutions.clear(); _snapshot->set_route_states(dirty); _snapshot->recall(); _snapshot->set_route_states(clean); @@ -206,39 +206,3 @@ MixerSnapshot::State MixerSnapshotSubstitutionDialog::get_state_by_name(const st } } } - -XMLNode& MixerSnapshotSubstitutionDialog::sanitize_node(XMLNode& node, const string route_name) -{ - //remove I/O - node.remove_node_and_delete("IO", "direction", "Input"); - node.remove_node_and_delete("IO", "direction", "Output"); - node.remove_node_and_delete("IO", "direction", "Output"); - - //remove diskwriter and reader - node.remove_node_and_delete("Processor", "type", "diskwriter"); - node.remove_node_and_delete("Processor", "type", "diskreader"); - - //set node to destination's name - node.set_property(X_("name"), route_name); - - //unlink playlists - node.remove_property(X_("id")); - node.remove_property(X_("audio-playlist")); - - XMLNode* pi_node = find_named_node(node, X_("PresentationInfo")); - - if(pi_node) { - pi_node->remove_property(X_("order")); - } - - //remove any sidechain stuff - XMLNodeList nlist = node.children(); - for(XMLNodeConstIterator niter = nlist.begin(); niter != nlist.end(); niter++) { - if((*niter)->name() != "Processor") { - continue; - } - (*niter)->remove_node_and_delete("Processor", "type", "sidechain"); - } - - return node; -} \ No newline at end of file diff --git a/gtk2_ardour/mixer_snapshot_substitution_dialog.h b/gtk2_ardour/mixer_snapshot_substitution_dialog.h index 5460a75302..5fa6539274 100644 --- a/gtk2_ardour/mixer_snapshot_substitution_dialog.h +++ b/gtk2_ardour/mixer_snapshot_substitution_dialog.h @@ -38,7 +38,6 @@ private: ARDOUR::MixerSnapshot::State get_state_by_name(const std::string); void fill_combo_box(Gtk::ComboBoxText*, const std::string); void on_response(int); - XMLNode& sanitize_node(XMLNode&, const std::string); std::vector substitutions;