mirror of
https://github.com/Ardour/ardour.git
synced 2026-01-21 04:45:58 +01:00
plugin selector: if neither name nor tag buttons are enabled, include creator in search fields
This commit is contained in:
parent
c08531f96e
commit
dddaffe3ac
1 changed files with 18 additions and 2 deletions
|
|
@ -384,20 +384,36 @@ PluginSelector::show_this_plugin (const PluginInfoPtr& info, const std::string&
|
|||
return false;
|
||||
}
|
||||
|
||||
bool search_name = _search_name_checkbox->get_active();
|
||||
bool search_tags = _search_tags_checkbox->get_active();
|
||||
bool search_creator = false;
|
||||
|
||||
if (!search_name && !search_tags) {
|
||||
search_name = true;
|
||||
search_tags = true;
|
||||
search_creator = true;
|
||||
}
|
||||
|
||||
if (!searchstr.empty()) {
|
||||
|
||||
if (_search_name_checkbox->get_active()) { /* name contains */
|
||||
if (search_name) {
|
||||
std::string compstr = info->name;
|
||||
setup_search_string (compstr);
|
||||
maybe_show |= match_search_strings (compstr, searchstr);
|
||||
}
|
||||
|
||||
if (_search_tags_checkbox->get_active()) { /* tag contains */
|
||||
if (search_tags) {
|
||||
std::string compstr = manager.get_tags_as_string (info);
|
||||
setup_search_string (compstr);
|
||||
maybe_show |= match_search_strings (compstr, searchstr);
|
||||
}
|
||||
|
||||
if (search_creator) {
|
||||
std::string compstr = info->creator;
|
||||
setup_search_string (compstr);
|
||||
maybe_show |= match_search_strings (compstr, searchstr);
|
||||
}
|
||||
|
||||
if (!maybe_show) {
|
||||
return false;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue