Allow to limit strip-inline controls (GUI optimization)

This commit is contained in:
Robin Gareus 2018-10-31 23:43:39 +01:00
parent 63a4cc9cf6
commit a79fe23935
3 changed files with 20 additions and 0 deletions

View file

@ -218,6 +218,8 @@ ProcessorEntry::ProcessorEntry (ProcessorBox* parent, boost::shared_ptr<Processo
_processor->PropertyChanged.connect (name_connection, invalidator (*this), boost::bind (&ProcessorEntry::processor_property_changed, this, _1), gui_context());
_processor->ConfigurationChanged.connect (config_connection, invalidator (*this), boost::bind (&ProcessorEntry::processor_configuration_changed, this, _1, _2), gui_context());
const uint32_t limit_inline_controls = UIConfiguration::instance().get_max_inline_controls ();
set<Evoral::Parameter> p = _processor->what_can_be_automated ();
for (set<Evoral::Parameter>::iterator i = p.begin(); i != p.end(); ++i) {
@ -241,6 +243,10 @@ ProcessorEntry::ProcessorEntry (ProcessorBox* parent, boost::shared_ptr<Processo
/* Add non-Amp (Fader & Trim) controls to the processor box */
_vbox.pack_start (c->box);
}
if (limit_inline_controls > 0 && _controls.size() >= limit_inline_controls) {
break;
}
}
setup_tooltip ();