Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge pull request #7116 from rldhont/processing-infinite-loop-in-ref…
…resh-algorithms-tree-218

[BUGFIX][Processing] Infinite loop in refresh algorithms tree 2.18
  • Loading branch information
rldhont committed Jun 11, 2018
2 parents cd8ab68 + ad394ac commit 2895819
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
6 changes: 6 additions & 0 deletions python/plugins/processing/core/Processing.py
Expand Up @@ -67,6 +67,8 @@

class Processing:

currentlyUpdatingAlgList = False

providers = []

# Same structure as algs in algList
Expand Down Expand Up @@ -179,10 +181,14 @@ def updateAlgsList():
requires the list of algorithms to be created again from
algorithm providers.
"""
if Processing.currentlyUpdatingAlgList:
return
Processing.currentlyUpdatingAlgList = True
QApplication.setOverrideCursor(QCursor(Qt.WaitCursor))
for p in Processing.providers:
Processing.reloadProvider(p.getName())
QApplication.restoreOverrideCursor()
Processing.currentlyUpdatingAlgList = False

@staticmethod
def reloadProvider(providerName):
Expand Down
1 change: 0 additions & 1 deletion python/plugins/processing/gui/ProcessingToolbox.py
Expand Up @@ -374,7 +374,6 @@ def __init__(self, providerName, tree, toolbox):

def refresh(self):
self.takeChildren()
Processing.updateAlgsList()
self.populate()

def populate(self):
Expand Down

0 comments on commit 2895819

Please sign in to comment.