From ec31741ee6d72fe48bdf35eaaf5c0a9c59f328d0 Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Sun, 13 Nov 2016 16:34:27 +0100 Subject: copy VST state on copy construction This fixes issues with replicate instances & plugin-analysis instances not using the same set of parameters. --- libs/ardour/lxvst_plugin.cc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'libs/ardour/lxvst_plugin.cc') diff --git a/libs/ardour/lxvst_plugin.cc b/libs/ardour/lxvst_plugin.cc index 3939048ad4..91ae757883 100644 --- a/libs/ardour/lxvst_plugin.cc +++ b/libs/ardour/lxvst_plugin.cc @@ -58,7 +58,11 @@ LXVSTPlugin::LXVSTPlugin (const LXVSTPlugin &other) _plugin = _state->plugin; - // Plugin::setup_controls (); + XMLNode* root = new XMLNode (other.state_node_name ()); + LocaleGuard lg; + other.add_state (root); + set_state (*root, Stateful::loading_state_version); + delete root; } LXVSTPlugin::~LXVSTPlugin () -- cgit v1.2.3