Skip to content
Browse files
[processing] fixed bug when editing help of example models
  • Loading branch information
volaya committed Sep 2, 2013
1 parent e44c57c commit 91b9c11b09a04512cc3a0ba864ae63111587a320
Showing with 14 additions and 7 deletions.
  1. +14 −6 python/plugins/processing/gui/
  2. +0 −1 python/plugins/processing/modeler/
@@ -27,7 +27,7 @@
import pickle
from PyQt4.QtCore import *
from PyQt4.QtGui import *

from qgis.core import *
from processing.ui.ui_DlgHelpEdition import Ui_DlgHelpEdition

class HelpEditionDialog(QDialog, Ui_DlgHelpEdition):
@@ -38,8 +38,9 @@ class HelpEditionDialog(QDialog, Ui_DlgHelpEdition):

def __init__(self, alg):


self.alg = alg
self.descriptions = {}
if self.alg.descriptionFile is not None:
@@ -62,9 +63,16 @@ def reject(self):
def accept(self):
self.descriptions[self.currentName] = unicode(self.text.toPlainText())
if self.alg.descriptionFile is not None:
f = open(self.alg.descriptionFile + ".help", "wb")
pickle.dump(self.descriptions, f)
f = open(self.alg.descriptionFile + ".help", "wb")
pickle.dump(self.descriptions, f)
except Exception, e:
QMessageBox.warning(self, "Error saving help file",
"Help file could not be saved."
"\nCheck that you have permission to modify the help file.\n"
"You might not have permission if you are editing an example\n"
"model or script, since they are stored on the installation folder")

def getHtml(self):
@@ -36,7 +36,6 @@
from processing.core.ProcessingConfig import ProcessingConfig
from processing.core.GeoAlgorithm import GeoAlgorithm
from processing.gui.AlgorithmClassification import AlgorithmDecorator
#from processing.gui.ProcessingToolbox import ProcessingToolbox
from processing.modeler.ModelerParameterDefinitionDialog import ModelerParameterDefinitionDialog
from processing.modeler.ModelerAlgorithm import ModelerAlgorithm
from processing.modeler.ModelerParametersDialog import ModelerParametersDialog

0 comments on commit 91b9c11

Please sign in to comment.