summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gtk2_ardour/plugin_ui.cc6
-rw-r--r--libs/ardour/ardour/plugin.h1
-rw-r--r--libs/ardour/plugin.cc10
3 files changed, 17 insertions, 0 deletions
diff --git a/gtk2_ardour/plugin_ui.cc b/gtk2_ardour/plugin_ui.cc
index 455cea1364..169928843a 100644
--- a/gtk2_ardour/plugin_ui.cc
+++ b/gtk2_ardour/plugin_ui.cc
@@ -593,6 +593,9 @@ PlugUIBase::preset_selected ()
warning << string_compose(_("Plugin preset %1 not found"),
_preset_combo.get_active_text()) << endmsg;
}
+ } else {
+ // blank selected = no preset
+ plugin->clear_preset();
}
}
@@ -745,6 +748,8 @@ PlugUIBase::update_preset_list ()
preset_labels.push_back (i->label);
}
+ preset_labels.push_back("");
+
set_popdown_strings (_preset_combo, preset_labels);
--_no_load_preset;
@@ -768,6 +773,7 @@ PlugUIBase::update_preset ()
void
PlugUIBase::update_preset_modified ()
{
+
if (plugin->last_preset().uri.empty()) {
_preset_modified.set_text ("");
return;
diff --git a/libs/ardour/ardour/plugin.h b/libs/ardour/ardour/plugin.h
index 15e5f4a9c5..bf91de903b 100644
--- a/libs/ardour/ardour/plugin.h
+++ b/libs/ardour/ardour/plugin.h
@@ -183,6 +183,7 @@ class Plugin : public PBD::StatefulDestructible, public Latent
void remove_preset (std::string);
virtual bool load_preset (PresetRecord);
+ void clear_preset ();
const PresetRecord * preset_by_label (const std::string &);
const PresetRecord * preset_by_uri (const std::string &);
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)