Skip to content

Commit

Permalink
Arch: Fixed encodings in Survey - fixes #1825
Browse files Browse the repository at this point in the history
  • Loading branch information
yorikvanhavre committed Dec 29, 2014
1 parent 638fa8b commit 2f78c02
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Mod/Arch/ArchCommands.py
Expand Up @@ -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:
Expand Down Expand Up @@ -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)

Expand Down

0 comments on commit 2f78c02

Please sign in to comment.