mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-25 00:58:06 -05:00
[processing] do not collapse tree when updating models or scripts
This commit is contained in:
parent
484f94c38f
commit
19eca9a84b
@ -144,7 +144,6 @@ class ProcessingPlugin:
|
||||
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 @@ class ProcessingToolbox(BASE, WIDGET):
|
||||
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 @@ class ProcessingToolbox(BASE, WIDGET):
|
||||
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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user