automation_play_all_button.signal_clicked.connect(sigc::bind (sigc::mem_fun (*this, &GenericPluginUI::set_all_automation), ARDOUR::Play));
automation_write_all_button.signal_clicked.connect(sigc::bind (sigc::mem_fun (*this, &GenericPluginUI::set_all_automation), ARDOUR::Write));
automation_touch_all_button.signal_clicked.connect(sigc::bind (sigc::mem_fun (*this, &GenericPluginUI::set_all_automation), ARDOUR::Touch));
+
+ /* XXX This is a workaround for AutomationControl not knowing about preset loads */
+ plugin->PresetLoaded.connect (*this, invalidator (*this), boost::bind (&GenericPluginUI::update_input_displays, this), gui_context ());
}
automation_state_changed (control_ui);
+ /* Add to the list of CUIs that need manual update to workaround
+ * AutomationControl not knowing about preset loads */
input_controls.push_back (control_ui);
} else {
}*/
}
+void
+GenericPluginUI::update_input_displays ()
+{
+ /* XXX This is a workaround for AutomationControl not knowing about preset loads */
+ for (vector<ControlUI*>::iterator i = input_controls.begin();
+ i != input_controls.end();
+ ++i) {
+ update_control_display(*i);
+ }
+ return;
+}
+
void
GenericPluginUI::control_combo_changed (ControlUI* cui, float value)
{
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;
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*);