Fix VST preset deletion.

git-svn-id: svn://localhost/ardour2/branches/3.0@8216 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
Carl Hetherington 2010-12-07 20:12:47 +00:00
parent 95acc21c69
commit c65d364661

View File

@ -440,11 +440,19 @@ VSTPlugin::do_remove_preset (string name)
{
if (_plugin->flags & 32 /* effFlagsProgramsChunks */) {
/* XXX: TODO */
error << _("no support for presets using chunks at this time")
<< endmsg;
return;
XMLTree* t = presets_tree ();
if (t == 0) {
return;
}
t->root()->remove_nodes_and_delete (X_("label"), name);
sys::path f = ARDOUR::user_config_directory ();
f /= "presets";
f /= "vst";
t->write (f.to_string ());
delete t;
}
}