Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
[processing] fixed toolbox updates
- Loading branch information
|
@@ -135,7 +135,7 @@ def _filterItem(self, item, text): |
|
|
item.setHidden(not show) |
|
|
return show |
|
|
elif isinstance(item, (TreeAlgorithmItem, TreeActionItem)): |
|
|
#hide = bool(text) and (text not in item.text(0).lower()) |
|
|
# hide = bool(text) and (text not in item.text(0).lower()) |
|
|
hide = bool(text) and not any(text in t for t in [item.text(0).lower(), item.data(0, Qt.UserRole).lower()]) |
|
|
if isinstance(item, TreeAlgorithmItem): |
|
|
hide = hide and (text not in item.alg.commandLineName()) |
|
@@ -377,6 +377,7 @@ def __init__(self, providerName, tree, toolbox): |
|
|
|
|
|
def refresh(self): |
|
|
self.takeChildren() |
|
|
Processing.updateAlgsList() |
|
|
self.populate() |
|
|
|
|
|
def populate(self): |
|
|
|
@@ -77,6 +77,7 @@ def _loadAlgorithms(self): |
|
|
self.loadFromFolder(folder) |
|
|
|
|
|
def loadFromFolder(self, folder): |
|
|
self.algs = [] |
|
|
if not os.path.exists(folder): |
|
|
return |
|
|
for path, subdirs, files in os.walk(folder): |
|
|