summaryrefslogtreecommitdiff
path: root/gtk2_ardour/plugin_ui.h
diff options
context:
space:
mode:
authorJulien "_FrnchFrgg_" RIVAUD <frnchfrgg@free.fr>2016-07-29 02:06:55 +0200
committerJulien "_FrnchFrgg_" RIVAUD <frnchfrgg@free.fr>2016-07-29 02:06:55 +0200
commit67cbdc6cf2dd03303a9a257096da7708aad085cb (patch)
treeff178e6c5b026b4a8991dd9b2299e8fe25c9314b /gtk2_ardour/plugin_ui.h
parent7e30161dc06483fd17ac9e19be1c478ead1b23f6 (diff)
GenericUI: Update all input controls on preset load
The existing code relies on AutomationControls for getting parameter changes and update the UI accordingly. One case where this doesn't yet work is preset loading, where ARDOUR::Plugin is responsible for actually loading the preset but doesn't notify the changes to AutomationControls. Since the input_controls vector now contains all ControlUI's that rely on AutomationControls to get updates, just listen to Plugin::PresetLoaded() and trigger an update of all elements in input_controls. This is temporary until a better solution is devised to make AutomationControls aware of preset loading.
Diffstat (limited to 'gtk2_ardour/plugin_ui.h')
-rw-r--r--gtk2_ardour/plugin_ui.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/gtk2_ardour/plugin_ui.h b/gtk2_ardour/plugin_ui.h
index 001054bae9..d534a99d70 100644
--- a/gtk2_ardour/plugin_ui.h
+++ b/gtk2_ardour/plugin_ui.h
@@ -260,7 +260,7 @@ class GenericPluginUI : public PlugUIBase, public Gtk::VBox
int x0, x1, y0, y1;
};
- std::vector<ControlUI*> input_controls;
+ std::vector<ControlUI*> input_controls; // workaround for preset load
std::vector<ControlUI*> input_controls_with_automation;
std::vector<ControlUI*> output_controls;
@@ -281,6 +281,7 @@ class GenericPluginUI : public PlugUIBase, public Gtk::VBox
void ui_parameter_changed (ControlUI* cui);
void update_control_display (ControlUI* cui);
+ void update_input_displays (); // workaround for preset load
void control_combo_changed (ControlUI* cui, float value);
void astate_clicked (ControlUI*);