copy VST state on copy construction
[ardour.git] / libs / ardour / mac_vst_plugin.cc
index 08c39b1d354b31f55ee2f7a957aaf484bcfb5d85..2cb7301ce800116699daf653a57344929c4dfb18 100644 (file)
@@ -58,7 +58,11 @@ MacVSTPlugin::MacVSTPlugin (const MacVSTPlugin &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;
 }
 
 MacVSTPlugin::~MacVSTPlugin ()