13
0

fixed automation *_all button crash

This commit is contained in:
Jeremy Carter 2014-11-11 19:33:25 -05:00
parent 7c263f3bc4
commit ca249f3e7c

View File

@ -327,12 +327,6 @@ GenericPluginUI::build ()
plugin->announce_property_values(); plugin->announce_property_values();
} }
// Connect automation *_all buttons
automation_manual_all_button.signal_clicked().connect(boost::bind(&GenericPluginUI::automation_manual_all, this, control_uis));
automation_play_all_button.signal_clicked().connect(boost::bind(&GenericPluginUI::automation_play_all, this, control_uis));
automation_write_all_button.signal_clicked().connect(boost::bind(&GenericPluginUI::automation_write_all, this, control_uis));
automation_touch_all_button.signal_clicked().connect(boost::bind(&GenericPluginUI::automation_touch_all, this, control_uis));
// Add special controls to UI, and build list of normal controls to be layed out later // Add special controls to UI, and build list of normal controls to be layed out later
std::vector<ControlUI *> cui_controls_list; std::vector<ControlUI *> cui_controls_list;
for (i = 0; i < control_uis.size(); ++i) { for (i = 0; i < control_uis.size(); ++i) {
@ -475,6 +469,12 @@ GenericPluginUI::build ()
output_table.show_all (); output_table.show_all ();
button_table.show_all (); button_table.show_all ();
// Connect automation *_all buttons
automation_manual_all_button.signal_clicked().connect(boost::bind(&GenericPluginUI::automation_manual_all, this, control_uis));
automation_play_all_button.signal_clicked().connect(boost::bind(&GenericPluginUI::automation_play_all, this, control_uis));
automation_write_all_button.signal_clicked().connect(boost::bind(&GenericPluginUI::automation_write_all, this, control_uis));
automation_touch_all_button.signal_clicked().connect(boost::bind(&GenericPluginUI::automation_touch_all, this, control_uis));
} }
GenericPluginUI::ControlUI::ControlUI (const Evoral::Parameter& p) GenericPluginUI::ControlUI::ControlUI (const Evoral::Parameter& p)
@ -842,6 +842,7 @@ GenericPluginUI::automation_manual_all(std::vector<ControlUI *>& controls)
{ {
for (std::vector<ControlUI *>::iterator control_it = controls.begin(); control_it != controls.end(); ++control_it) for (std::vector<ControlUI *>::iterator control_it = controls.begin(); control_it != controls.end(); ++control_it)
{ {
if ((*control_it)->controller || (*control_it)->button)
set_automation_state((AutoState) ARDOUR::Off, (*control_it)); set_automation_state((AutoState) ARDOUR::Off, (*control_it));
} }
} }
@ -851,6 +852,7 @@ GenericPluginUI::automation_play_all(std::vector<ControlUI *>& controls)
{ {
for (std::vector<ControlUI *>::iterator control_it = controls.begin(); control_it != controls.end(); ++control_it) for (std::vector<ControlUI *>::iterator control_it = controls.begin(); control_it != controls.end(); ++control_it)
{ {
if ((*control_it)->controller || (*control_it)->button)
set_automation_state((AutoState) Play, (*control_it)); set_automation_state((AutoState) Play, (*control_it));
} }
} }
@ -860,6 +862,7 @@ GenericPluginUI::automation_write_all(std::vector<ControlUI *>& controls)
{ {
for (std::vector<ControlUI *>::iterator control_it = controls.begin(); control_it != controls.end(); ++control_it) for (std::vector<ControlUI *>::iterator control_it = controls.begin(); control_it != controls.end(); ++control_it)
{ {
if ((*control_it)->controller || (*control_it)->button)
set_automation_state((AutoState) Write, (*control_it)); set_automation_state((AutoState) Write, (*control_it));
} }
} }
@ -869,6 +872,7 @@ GenericPluginUI::automation_touch_all(std::vector<ControlUI *>& controls)
{ {
for (std::vector<ControlUI *>::iterator control_it = controls.begin(); control_it != controls.end(); ++control_it) for (std::vector<ControlUI *>::iterator control_it = controls.begin(); control_it != controls.end(); ++control_it)
{ {
if ((*control_it)->controller || (*control_it)->button)
set_automation_state((AutoState) Touch, (*control_it)); set_automation_state((AutoState) Touch, (*control_it));
} }
} }