13
0

Don't show DSP stats of inserts that don't collect them.

This commit is contained in:
Robin Gareus 2018-12-03 22:34:14 +01:00
parent d1cf21634f
commit 78f749ef65
Signed by: rgareus
GPG Key ID: A090BCE02CF57F04
2 changed files with 4 additions and 2 deletions

View File

@ -157,7 +157,9 @@ GenericPluginUI::GenericPluginUI (boost::shared_ptr<PluginInsert> pi, bool scrol
pack_end (plugin_analysis_expander, false, false);
}
pack_end (cpuload_expander, false, false);
if (insert->provides_stats ()) {
pack_end (cpuload_expander, false, false);
}
if (!plugin->get_docs().empty()) {
pack_end (description_expander, false, false);

View File

@ -154,7 +154,7 @@ PluginDSPLoadWindow::add_processor_to_display (boost::weak_ptr<Processor> w, std
{
boost::shared_ptr<Processor> p = w.lock ();
boost::shared_ptr<PluginInsert> pi = boost::dynamic_pointer_cast<PluginInsert> (p);
if (!pi) {
if (!pi || !pi->provides_stats ()) {
return;
}
p->DropReferences.connect (_processor_connections, MISSING_INVALIDATOR, boost::bind (&PluginDSPLoadWindow::refill_processors, this), gui_context());