Use shared static method to count plugins

This moves MixersStrip::help_count_plugins to RouteUI,
so that it can be shared with other Strip implementations.
This commit is contained in:
Robin Gareus 2022-01-01 15:34:47 +01:00
parent 4318d25ec7
commit 0a17d8e66a
No known key found for this signature in database
GPG key ID: A090BCE02CF57F04
4 changed files with 22 additions and 26 deletions

View file

@ -2254,6 +2254,23 @@ RouteUI::route_group() const
return _route->route_group();
}
void
RouteUI::help_count_plugins (boost::weak_ptr<Processor> p, uint32_t* plugin_insert_cnt)
{
boost::shared_ptr<Processor> processor (p.lock ());
if (!processor || !processor->display_to_user()) {
return;
}
boost::shared_ptr<PluginInsert> pi = boost::dynamic_pointer_cast<PluginInsert> (processor);
#ifdef MIXBUS
if (pi && pi->is_channelstrip ()) {
return;
}
#endif
if (pi) {
++(*plugin_insert_cnt);
}
}
RoutePinWindowProxy::RoutePinWindowProxy(std::string const &name, boost::shared_ptr<ARDOUR::Route> route)
: WM::ProxyBase (name, string())