Arch: Fixed encodings in Survey - fixes #1825
This commit is contained in:
parent
638fa8ba75
commit
2f78c021db
|
@ -727,7 +727,7 @@ def survey(callback=False):
|
|||
t = t.getUserPreferred()[0]
|
||||
t = t.encode("utf8")
|
||||
anno.LabelText = "l " + t
|
||||
FreeCAD.Console.PrintMessage("Object: " + n + ", Element: Whole, Length: " + t + "\n")
|
||||
FreeCAD.Console.PrintMessage("Object: " + n + ", Element: Whole, Length: " + t.decode("utf8") + "\n")
|
||||
if FreeCAD.GuiUp and t:
|
||||
QtGui.qApp.clipboard().setText(t)
|
||||
else:
|
||||
|
@ -755,13 +755,13 @@ def survey(callback=False):
|
|||
t = t.getUserPreferred()[0]
|
||||
t = t.encode("utf8")
|
||||
anno.LabelText = "l " + t
|
||||
FreeCAD.Console.PrintMessage("Object: " + n + ", Element: " + el + ", Length: " + t + "\n")
|
||||
FreeCAD.Console.PrintMessage("Object: " + n + ", Element: " + el + ", Length: " + t.decode("utf8") + "\n")
|
||||
elif "Vertex" in el:
|
||||
t = FreeCAD.Units.Quantity(e.Z,FreeCAD.Units.Length)
|
||||
t = t.getUserPreferred()[0]
|
||||
t = t.encode("utf8")
|
||||
anno.LabelText = "z " + t
|
||||
FreeCAD.Console.PrintMessage("Object: " + n + ", Element: " + el + ", Zcoord: " + t + "\n")
|
||||
FreeCAD.Console.PrintMessage("Object: " + n + ", Element: " + el + ", Zcoord: " + t.decode("utf8") + "\n")
|
||||
if FreeCAD.GuiUp and t:
|
||||
QtGui.qApp.clipboard().setText(t)
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user