Skip to content

Commit

Permalink
[processing] do not collapse tree when updating models or scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
volaya committed Oct 6, 2015
1 parent 484f94c commit 19eca9a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
1 change: 0 additions & 1 deletion python/plugins/processing/ProcessingPlugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,6 @@ def openModeler(self):
dlg = ModelerDialog()
dlg.exec_()
if dlg.update:
Processing.updateAlgsList()
self.toolbox.updateProvider('model')

def openResults(self):
Expand Down
8 changes: 7 additions & 1 deletion python/plugins/processing/gui/ProcessingToolbox.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@ class ProcessingToolbox(BASE, WIDGET):

USE_CATEGORIES = '/Processing/UseSimplifiedInterface'

updateAlgList = True

def __init__(self):
super(ProcessingToolbox, self).__init__(None)
self.setupUi(self)
Expand Down Expand Up @@ -118,11 +120,14 @@ def modeHasChanged(self):
self.fillTree()

def algsListHasChanged(self):
self.fillTree()
if self.updateAlgList:
self.fillTree()

def updateProvider(self, providerName, updateAlgsList=True):
if updateAlgsList:
self.updateAlgList = False
Processing.updateAlgsList()
self.updateAlgList = True
for i in xrange(self.algorithmTree.invisibleRootItem().childCount()):
child = self.algorithmTree.invisibleRootItem().child(i)
if isinstance(child, TreeProviderItem):
Expand All @@ -133,6 +138,7 @@ def updateProvider(self, providerName, updateAlgsList=True):
for i in xrange(child.childCount()):
child.child(i).sortChildren(0, Qt.AscendingOrder)
break
self.addRecentAlgorithms(True)

def showPopupMenu(self, point):
item = self.algorithmTree.itemAt(point)
Expand Down

0 comments on commit 19eca9a

Please sign in to comment.