diff options
author | Robin Gareus <robin@gareus.org> | 2018-06-09 14:40:46 +0200 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2018-06-09 14:40:46 +0200 |
commit | 59a3b040a3b38bca997723025aba272c201bec37 (patch) | |
tree | 324915946a4db2558428d5bb08e87945d7180584 | |
parent | 7fbbfc072956884427d881e3f6e8d08544fad12b (diff) |
Hide designated LV2 freewheeling port.
-rw-r--r-- | libs/ardour/lv2_plugin.cc | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/libs/ardour/lv2_plugin.cc b/libs/ardour/lv2_plugin.cc index 13bca60b10..1fd54c6286 100644 --- a/libs/ardour/lv2_plugin.cc +++ b/libs/ardour/lv2_plugin.cc @@ -2325,18 +2325,22 @@ LV2Plugin::describe_parameter(Evoral::Parameter which) { if (( which.type() == PluginAutomation) && ( which.id() < parameter_count()) ) { - if (lilv_port_has_property(_impl->plugin, - lilv_plugin_get_port_by_index(_impl->plugin, which.id()), _world.ext_notOnGUI)) { + const LilvPort* port = lilv_plugin_get_port_by_index(_impl->plugin, which.id()); + + if (lilv_port_has_property(_impl->plugin, port, _world.ext_notOnGUI)) { + return X_("hidden"); + } + + const LilvPort* fwport = lilv_plugin_get_port_by_designation(_impl->plugin, _world.lv2_InputPort, _world.lv2_freewheeling); + if (fwport && fwport == port) { return X_("hidden"); } - if (lilv_port_has_property(_impl->plugin, - lilv_plugin_get_port_by_index(_impl->plugin, which.id()), _world.lv2_freewheeling)) { + if (lilv_port_has_property(_impl->plugin, port, _world.lv2_freewheeling)) { return X_("hidden"); } - if (lilv_port_has_property(_impl->plugin, - lilv_plugin_get_port_by_index(_impl->plugin, which.id()), _world.lv2_reportsLatency)) { + if (lilv_port_has_property(_impl->plugin, port, _world.lv2_reportsLatency)) { return X_("latency"); } |