mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-07 15:25:01 +01:00
Consolidate code, use API
This commit is contained in:
parent
6e28c43cef
commit
7946e442d3
1 changed files with 1 additions and 25 deletions
|
|
@ -162,31 +162,7 @@ GenericPluginUI::GenericPluginUI (std::shared_ptr<PlugInsertBase> pib, bool scro
|
||||||
settings_box.set_border_width (0);
|
settings_box.set_border_width (0);
|
||||||
settings_box.pack_start (*smaller_hbox, false, false);
|
settings_box.pack_start (*smaller_hbox, false, false);
|
||||||
|
|
||||||
bool has_automatables = false;
|
if (_pi && _pi->has_automatables ()) {
|
||||||
|
|
||||||
for (size_t i = 0; i < plugin->parameter_count(); ++i) {
|
|
||||||
if (!plugin->parameter_is_control (i)) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
if (!plugin->parameter_is_input (i)) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
const Evoral::Parameter param(PluginAutomation, 0, i);
|
|
||||||
std::shared_ptr<ARDOUR::AutomationControl> c (std::dynamic_pointer_cast<ARDOUR::AutomationControl>(_pib->control (param)));
|
|
||||||
if (!c) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
if (c->flags () & Controllable::HiddenControl) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
if (c->flags () & Controllable::NotAutomatable) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
has_automatables = true;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (_pi && has_automatables) {
|
|
||||||
HBox* automation_hbox = manage (new HBox);
|
HBox* automation_hbox = manage (new HBox);
|
||||||
automation_hbox->set_spacing (6);
|
automation_hbox->set_spacing (6);
|
||||||
Label* l = manage (new Label (_("All Automation")));
|
Label* l = manage (new Label (_("All Automation")));
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue