Draft: Fixed utf8 bug in shapestring
This commit is contained in:
parent
96ff9e37c2
commit
6245957478
|
@ -1022,7 +1022,9 @@ class DraftToolBar:
|
||||||
dialogCaption,
|
dialogCaption,
|
||||||
dialogDir,
|
dialogDir,
|
||||||
dialogFilter)
|
dialogFilter)
|
||||||
fname = str(fname.toUtf8()) # QString to PyString
|
print fname
|
||||||
|
#fname = str(fname.toUtf8()) # QString to PyString
|
||||||
|
fname = fname[0].decode("utf8")
|
||||||
# print "debug: D_G DraftToolBar.pickFile type(fname): " str(type(fname))
|
# print "debug: D_G DraftToolBar.pickFile type(fname): " str(type(fname))
|
||||||
|
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
|
@ -1041,7 +1043,7 @@ class DraftToolBar:
|
||||||
if self.sourceCmd:
|
if self.sourceCmd:
|
||||||
if (self.labelFFile.isVisible()):
|
if (self.labelFFile.isVisible()):
|
||||||
if self.FFileValue.text():
|
if self.FFileValue.text():
|
||||||
self.sourceCmd.validFFile(str(self.FFileValue.text().toUtf8())) #QString to PyString
|
self.sourceCmd.validFFile(self.FFileValue.text().decode("utf8")) #QString to PyString
|
||||||
else:
|
else:
|
||||||
FreeCAD.Console.PrintMessage(translate("draft", "Please enter a font file."))
|
FreeCAD.Console.PrintMessage(translate("draft", "Please enter a font file."))
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user