mirror of
https://github.com/lucaspalomodevelop/meshlab.git
synced 2026-03-13 00:07:24 +00:00
include filter name always also when searching for python filter names
This commit is contained in:
parent
98a9fc8bf3
commit
1ad302e21a
@ -44,19 +44,18 @@ void ActionSearcher::clear()
|
||||
void ActionSearcher::addAction(QAction *action, bool usePythonFilterNames)
|
||||
{
|
||||
if (action != nullptr) {
|
||||
if (!usePythonFilterNames) {
|
||||
// add title to the action map
|
||||
QString title = action->text();
|
||||
title = title.toLower();
|
||||
title.remove(ignexp);
|
||||
QStringList res = title.split(sepexp, Qt::SkipEmptyParts);
|
||||
res.removeDuplicates();
|
||||
addSubStrings(res);
|
||||
for (const QString& str : qAsConst(res)) {
|
||||
titleActionsMap[str].push_back(action);
|
||||
}
|
||||
|
||||
// add title to the action map
|
||||
QString title = action->text();
|
||||
title = title.toLower();
|
||||
title.remove(ignexp);
|
||||
QStringList res = title.split(sepexp, Qt::SkipEmptyParts);
|
||||
res.removeDuplicates();
|
||||
addSubStrings(res);
|
||||
for (const QString& str : qAsConst(res)) {
|
||||
titleActionsMap[str].push_back(action);
|
||||
}
|
||||
else {
|
||||
if (usePythonFilterNames) {
|
||||
// if the action is a filter, we should add also the python name to the search
|
||||
QObject* parent = action->parent();
|
||||
FilterPlugin* fp = qobject_cast<FilterPlugin*>(parent);
|
||||
@ -77,7 +76,7 @@ void ActionSearcher::addAction(QAction *action, bool usePythonFilterNames)
|
||||
QString info = action->toolTip();
|
||||
info = info.toLower();
|
||||
info.remove(ignexp);
|
||||
QStringList res = info.split(sepexp, Qt::SkipEmptyParts);
|
||||
res = info.split(sepexp, Qt::SkipEmptyParts);
|
||||
res.removeDuplicates();
|
||||
addSubStrings(res);
|
||||
for (const QString& str : qAsConst(res)) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user