copy VST state on copy construction
[ardour.git] / libs / ardour / lxvst_plugin.cc
index 3939048ad443e7ceca3ccaebb7227b7db66c6e3b..91ae75788340989ac4ea1ca4c15205fc38abcb4b 100644 (file)
@@ -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 ()