summaryrefslogtreecommitdiff
path: root/libs/ardour/vst_plugin.cc
diff options
context:
space:
mode:
authorCarl Hetherington <carl@carlh.net>2010-12-07 20:12:47 +0000
committerCarl Hetherington <carl@carlh.net>2010-12-07 20:12:47 +0000
commitc65d36466194c339ba6d3612b277b9837765579a (patch)
treea4dbd7b85ca9a7898d2fb39e876a262e3e6c5e92 /libs/ardour/vst_plugin.cc
parent95acc21c697107d27899a6d605f0e611be912ecd (diff)
Fix VST preset deletion.
git-svn-id: svn://localhost/ardour2/branches/3.0@8216 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/vst_plugin.cc')
-rw-r--r--libs/ardour/vst_plugin.cc18
1 files changed, 13 insertions, 5 deletions
diff --git a/libs/ardour/vst_plugin.cc b/libs/ardour/vst_plugin.cc
index edcb665435..26b3ce78f6 100644
--- a/libs/ardour/vst_plugin.cc
+++ b/libs/ardour/vst_plugin.cc
@@ -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;
}
}