Skip to content
Browse files
Merge pull request #2058 from arnaud-morvan/processing-model-help
Fix processing model help saving
  • Loading branch information
volaya committed May 22, 2015
2 parents f5054ce + c19a4a7 commit 5c3a7af532045be258f9584b231955959572e547
@@ -80,21 +80,6 @@ def reject(self):

def accept(self):
self.descriptions[self.currentName] = unicode(self.text.toPlainText())
if isinstance(self.alg, ModelerAlgorithm):
self.alg.helpContent = self.descriptions
if self.alg.descriptionFile is not None:
with open(self.alg.descriptionFile + '.help', 'w') as f:
json.dump(self.descriptions, f)
except Exception, e:
QMessageBox.warning(self,'Error saving help file'),'Help file could not be saved.\n'
'Check that you have permission to modify the help\n'
'file. You might not have permission if you are \n'
'editing an example model or script, since they \n'
'are stored on the installation folder'))


def getHtml(self):
@@ -168,11 +168,9 @@ def editHelp(self):

dlg = HelpEditionDialog(alg)

# We store the description string in case there were not saved
# because there was no filename defined yet
if self.alg is None and dlg.descriptions:
if dlg.descriptions: = dlg.descriptions

def openScript(self):
if self.hasChanged:
@@ -226,6 +226,7 @@ def editHelp(self):
dlg = HelpEditionDialog(alg)
if dlg.descriptions:
self.alg.helpContent = dlg.descriptions
self.hasChanged = True

def runModel(self):

0 comments on commit 5c3a7af

Please sign in to comment.