diff options
author | Robin Gareus <robin@gareus.org> | 2015-07-10 22:09:18 +0200 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2015-07-10 22:09:18 +0200 |
commit | 4c608b6e04b7187f19ecb80e1b804b2b9c65cb34 (patch) | |
tree | d44fa6000530e5e3f53a1d728fcb2e0c559ec6a6 /gtk2_ardour/processor_box.cc | |
parent | 9ab76a5cf0a8dc2ce1032184970225fb7491deaf (diff) |
assign new IDs to plugin copies on paste.
when copying a plugin the state is transferred by serializing
XML and setting state from XML. This state includes the unique ID.
This ID needs to be identical at first in order to load
the state from <session-dir>/plugins/<ID>/*
Diffstat (limited to 'gtk2_ardour/processor_box.cc')
-rw-r--r-- | gtk2_ardour/processor_box.cc | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/gtk2_ardour/processor_box.cc b/gtk2_ardour/processor_box.cc index 71435fe9e4..a059f32a05 100644 --- a/gtk2_ardour/processor_box.cc +++ b/gtk2_ardour/processor_box.cc @@ -2155,9 +2155,10 @@ ProcessorBox::paste_processor_state (const XMLNodeList& nlist, boost::shared_ptr /* XXX its a bit limiting to assume that everything else is a plugin. */ - p.reset (new PluginInsert (*_session)); - p->set_state (**niter, Stateful::current_state_version); + PBD::ID id = p->id(); + p->set_state (**niter, Stateful::current_state_version); + boost::dynamic_pointer_cast<PluginInsert>(p)->update_id (id); } copies.push_back (p); |