mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-06 14:54:56 +01:00
Ignore pinout when copy/pasting plugins using Ctrl+c/v
This can lead to invalid configuration and crashes in
case plugin-replication changes.
see also 9ab84a95f1
This commit is contained in:
parent
a75c239c0c
commit
8fcbe789b4
1 changed files with 19 additions and 1 deletions
|
|
@ -2047,6 +2047,8 @@ ProcessorBox::object_drop (DnDVBox<ProcessorEntry>* source, ProcessorEntry* posi
|
||||||
/* strip side-chain state (processor inside processor must be a side-chain)
|
/* strip side-chain state (processor inside processor must be a side-chain)
|
||||||
* otherwise we'll end up with duplicate ports-names.
|
* otherwise we'll end up with duplicate ports-names.
|
||||||
* (this needs a better solution which retains connections)
|
* (this needs a better solution which retains connections)
|
||||||
|
*
|
||||||
|
* see also ProcessorBox::paste_processor_state
|
||||||
*/
|
*/
|
||||||
state.remove_nodes_and_delete ("Processor");
|
state.remove_nodes_and_delete ("Processor");
|
||||||
state.remove_property ("count");
|
state.remove_property ("count");
|
||||||
|
|
@ -3590,14 +3592,30 @@ ProcessorBox::paste_processor_state (const XMLNodeList& nlist, boost::shared_ptr
|
||||||
* only then update the ID)
|
* only then update the ID)
|
||||||
*/
|
*/
|
||||||
PBD::ID id = p->id();
|
PBD::ID id = p->id();
|
||||||
|
XMLNode state (**niter);
|
||||||
/* strip side-chain state (processor inside processor must be a side-chain)
|
/* strip side-chain state (processor inside processor must be a side-chain)
|
||||||
* otherwise we'll end up with duplicate ports-names.
|
* otherwise we'll end up with duplicate ports-names.
|
||||||
* (this needs a better solution which retains connections)
|
* (this needs a better solution which retains connections)
|
||||||
|
*
|
||||||
|
* see also ProcessorBox::object_drop
|
||||||
*/
|
*/
|
||||||
XMLNode state (**niter);
|
|
||||||
state.remove_nodes_and_delete ("Processor");
|
state.remove_nodes_and_delete ("Processor");
|
||||||
|
|
||||||
|
uint32_t count = 0;
|
||||||
|
state.get_property ("count", count);
|
||||||
state.remove_property ("count");
|
state.remove_property ("count");
|
||||||
|
|
||||||
|
state.remove_property ("custom");
|
||||||
|
state.remove_nodes_and_delete ("ConfiguredInput");
|
||||||
|
state.remove_nodes_and_delete ("CustomSinks");
|
||||||
|
state.remove_nodes_and_delete ("ConfiguredOutput");
|
||||||
|
state.remove_nodes_and_delete ("PresetOutput");
|
||||||
|
state.remove_nodes_and_delete ("ThruMap");
|
||||||
|
for (uint32_t i = 0; i < count; ++i) {
|
||||||
|
state.remove_nodes_and_delete (string_compose ("InputMap-%1", i));
|
||||||
|
state.remove_nodes_and_delete (string_compose ("OutputMap-%1", i));
|
||||||
|
}
|
||||||
|
|
||||||
/* Controllable and automation IDs should not be copied */
|
/* Controllable and automation IDs should not be copied */
|
||||||
PBD::Stateful::ForceIDRegeneration force_ids;
|
PBD::Stateful::ForceIDRegeneration force_ids;
|
||||||
p->set_state (state, Stateful::current_state_version);
|
p->set_state (state, Stateful::current_state_version);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue