+ --_no_load_preset;
+}
+
+void
+PlugUIBase::update_preset ()
+{
+ Plugin::PresetRecord p = plugin->last_preset();
+
+ ++_no_load_preset;
+ _preset_combo.set_active_text (p.label);
+ --_no_load_preset;
+
+ save_button.set_sensitive (!p.uri.empty() && p.user);
+ delete_button.set_sensitive (!p.uri.empty() && p.user);
+
+ update_preset_modified ();
+}
+
+void
+PlugUIBase::update_preset_modified ()
+{
+ if (plugin->last_preset().uri.empty()) {
+ _preset_modified.set_text ("");
+ return;
+ }
+
+ bool const c = plugin->parameter_changed_since_last_preset ();
+ if (_preset_modified.get_text().empty() == c) {
+ _preset_modified.set_text (c ? "*" : "");
+ }
+}
+
+void
+PlugUIBase::parameter_changed (uint32_t, float)
+{
+ update_preset_modified ();
+}
+
+void
+PlugUIBase::preset_added_or_removed ()
+{
+ /* Update both the list and the currently-displayed preset */
+ update_preset_list ();
+ update_preset ();