13
0

Vapor: hide surround pan controls when removing channel(s)

This commit is contained in:
Robin Gareus 2024-01-29 21:42:03 +01:00
parent 21c3c865d3
commit 2579bb6dd4
Signed by: rgareus
GPG Key ID: A090BCE02CF57F04

View File

@ -255,6 +255,15 @@ SurroundSend::configure_io (ChanCount in, ChanCount out)
add_pannable ();
}
if (changed) {
for (uint32_t i = 0; i < n_audio; ++i) {
_pannable[i]->foreach_pan_control ([](std::shared_ptr<AutomationControl> ac) { ac->clear_flag (PBD::Controllable::HiddenControl); });
}
for (uint32_t i = n_audio; i < _pannable.size (); ++i) {
_pannable[i]->foreach_pan_control ([](std::shared_ptr<AutomationControl> ac) { ac->set_flag (PBD::Controllable::HiddenControl); });
}
}
#ifdef MIXBUS
/* Link visibility - currently only for Mixbus which has a custom UI, and at most stereo */
for (uint32_t i = 0; i < _pannable.size (); ++i) {
@ -348,6 +357,10 @@ SurroundSend::cycle_start (pframes_t /*nframes*/)
std::string
SurroundSend::describe_parameter (Evoral::Parameter param)
{
if (param.id() >= n_pannables ()) {
return X_("hidden");
}
if (n_pannables () < 2) {
/* Use default names */
return Automatable::describe_parameter (param);