summaryrefslogtreecommitdiff
path: root/libs/ardour/plugin.cc
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2012-06-19 16:02:24 +0000
committerPaul Davis <paul@linuxaudiosystems.com>2012-06-19 16:02:24 +0000
commit1df227424a651f3835f2e13b0cee7baa69d470ee (patch)
treecaac3b6c0c4f0a7ee0ee8b4f900cd451baad589f /libs/ardour/plugin.cc
parent7a24e49fa07a363f677b89613e0e281cceef2804 (diff)
patch from colinf that adds an 'empty' preset to the preset drop-down list, so that plugins can be set back to the 'no preset' state rather than being stuck in the state of 'preset loaded and modified'. This should apply to all plugin types, though I've only tried it on LV2 and LADSPA.
git-svn-id: svn://localhost/ardour2/branches/3.0@12787 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/plugin.cc')
-rw-r--r--libs/ardour/plugin.cc10
1 files changed, 10 insertions, 0 deletions
diff --git a/libs/ardour/plugin.cc b/libs/ardour/plugin.cc
index 4afc39b4ec..8cdbf98b89 100644
--- a/libs/ardour/plugin.cc
+++ b/libs/ardour/plugin.cc
@@ -327,6 +327,16 @@ Plugin::load_preset (PresetRecord r)
return true;
}
+void
+Plugin::clear_preset ()
+{
+ _last_preset.uri = "";
+ _last_preset.label = "";
+ _parameter_changed_since_last_preset = false;
+
+ PresetLoaded (); /* EMIT SIGNAL */
+}
+
/** @param val `plugin' value */
void
Plugin::set_parameter (uint32_t which, float val)