Skip to content

Commit

Permalink
[processing] restore script collection creator (fix #17649)
Browse files Browse the repository at this point in the history
  • Loading branch information
alexbruy committed Dec 27, 2017
1 parent 3b89052 commit d58053d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
Expand Up @@ -40,6 +40,7 @@
def classFactory(iface):
return ProcessingScriptCollectionPlugin()
'''

metadataTemplate = '''[general]
name=$name$
description=$description$
Expand Down
7 changes: 4 additions & 3 deletions python/plugins/processing/script/ScriptSelector.py
Expand Up @@ -59,7 +59,7 @@ def __init__(self):
scriptItem.setFlags(scriptItem.flags() | Qt.ItemIsUserCheckable)
scriptItem.setCheckState(0, Qt.Checked)
scriptItem.script = script
scriptItem.setText(0, script.name)
scriptItem.setText(0, script.name())
groupItem.addChild(scriptItem)
self.scriptsTree.addTopLevelItem(groupItem)

Expand All @@ -74,7 +74,7 @@ def __init__(self):
self.buttonBox.rejected.connect(self.cancelPressed)

def selectFolder(self):
folder = QFileDialog.getExistingDirectory(self, 'Select folder')
folder = QFileDialog.getExistingDirectory(self, "Select folder")
if folder:
self.folderBox.setText(folder)

Expand All @@ -95,7 +95,7 @@ def _getValue(self, textBox):
if value:
return value
textBox.setStyleSheet("QLineEdit{background: yellow}")
raise Exception("wrong parameter value")
raise Exception("Wrong parameter value")

def okPressed(self):
self.scripts = []
Expand All @@ -113,4 +113,5 @@ def okPressed(self):
self.email = self._getValue(self.emailBox)
except:
return

self.close()

0 comments on commit d58053d

Please sign in to comment.