Skip to content
Permalink
Browse files
[processing] do not collapse tree when updating models or scripts
  • Loading branch information
volaya committed Oct 6, 2015
1 parent 484f94c commit 19eca9a84bed18f2c7ec888069e913b725d8e63b
@@ -144,7 +144,6 @@ def openModeler(self):
dlg = ModelerDialog()
dlg.exec_()
if dlg.update:
Processing.updateAlgsList()
self.toolbox.updateProvider('model')

def openResults(self):
@@ -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)
@@ -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):
@@ -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)

0 comments on commit 19eca9a

Please sign in to comment.