warning << string_compose(_("Plugin preset %1 not found"),
_preset_combo.get_active_text()) << endmsg;
}
+ } else {
+ // blank selected = no preset
+ plugin->clear_preset();
}
}
preset_labels.push_back (i->label);
}
+ preset_labels.push_back("");
+
set_popdown_strings (_preset_combo, preset_labels);
--_no_load_preset;
void
PlugUIBase::update_preset_modified ()
{
+
if (plugin->last_preset().uri.empty()) {
_preset_modified.set_text ("");
return;
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 &);
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)