Skip to content
Permalink
Browse files

[processing] fixed help in models

  • Loading branch information
volaya committed Nov 23, 2014
1 parent 8039895 commit 484e16254ddd42cea6b2b71b8af0e7701e6c553e
@@ -165,6 +165,7 @@ def getCopy(self):
newone.name = self.name
newone.group = self.group
newone.descriptionFile = self.descriptionFile
newone.helpContent = copy.deepcopy(self.helpContent)
return newone

def __init__(self):
@@ -473,13 +474,14 @@ def updateModelerView(self):
self.modelerdialog.repaintModel()

def help(self):
print self.helpContent
try:
return True, getHtmlFromDescriptionsDict(self, self.help())
return True, getHtmlFromDescriptionsDict(self, self.helpContent)
except:
return False, None

def todict(self):
keys = ["inputs", "group", "name", "algs"]
keys = ["inputs", "group", "name", "algs", "helpContent"]
return {k:v for k,v in self.__dict__.iteritems() if k in keys}

def toJson(self):
@@ -493,6 +495,7 @@ def todict(o):
pass
return json.dumps(self, default=todict, indent=4)


@staticmethod
def fromJson(s):
def fromdict(d):
@@ -84,6 +84,7 @@ def loadFromFolder(self, folder):
alg = ModelerAlgorithm.fromFile(fullpath)
if alg.name:
alg.provider = self
alg.descriptionFile = fullpath
self.algs.append(alg)
else:
ProcessingLog.addToLog(ProcessingLog.LOG_ERROR,
@@ -215,8 +215,10 @@ def closeEvent(self, evt):
evt.accept()

def editHelp(self):
dlg = HelpEditionDialog(self.alg.getCopy())
dlg = HelpEditionDialog(self.alg)
dlg.exec_()
if dlg.descriptions:
self.hasChanged = True

def runModel(self):
if len(self.alg.algs) == 0:

0 comments on commit 484e162

Please sign in to comment.
You can’t perform that action at this time.