Commit b0605411 authored by Yori 'AGy' Fournier's avatar Yori 'AGy' Fournier
Browse files

Bug25 corrected Now string are correctly evaluated

in qOpenFileWidget I add a test before giving the default value (of an argument of a function)
to the value of the text widget. The test check if the defualt value is a string and add some ""
around the default value such that they will be evaluated as string and not as python command.
parent 64c0f144
......@@ -92,7 +92,11 @@ class QFunctionFormular(QWidget):
if self.optionalArgs != ():
# make a QLineEdit with default variable for each optionalArgs
for arg, default in zip(self.optionalArgs, self.defaultValues):
self.wOptionalArgs.append(QLineEdit(str(default), self))
if isinstance(default, str):
strDefault = "'" + default + "'"
strDefault = default
self.wOptionalArgs.append(QLineEdit(str(strDefault), self))
self.layout.addRow(str(arg), self.wOptionalArgs[-1])
# make a QLineEdit for the args
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment