[processing] fixed toolbox updates

This commit is contained in:
volaya 2016-05-18 12:07:50 +02:00
parent fc08535429
commit bfa90a9125
2 changed files with 3 additions and 1 deletions

View File

@ -135,7 +135,7 @@ class ProcessingToolbox(BASE, WIDGET):
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 @@ class TreeProviderItem(QTreeWidgetItem):
def refresh(self):
self.takeChildren()
Processing.updateAlgsList()
self.populate()
def populate(self):

View File

@ -77,6 +77,7 @@ class ModelerAlgorithmProvider(AlgorithmProvider):
self.loadFromFolder(folder)
def loadFromFolder(self, folder):
self.algs = []
if not os.path.exists(folder):
return
for path, subdirs, files in os.walk(folder):