Skip to content

Commit

Permalink
Draft: display coordinates using the current locale's decimal separat…
Browse files Browse the repository at this point in the history
…or - fixes #1741
  • Loading branch information
yorikvanhavre committed Sep 27, 2014
1 parent e820a32 commit 463b5d4
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/Mod/Draft/DraftGui.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@ def displayExternal(internValue,decimals=4,dim='Length',showUnit=True):
'''return an internal value (ie mm) Length or Angle converted for display according
to Units Schema in use.'''
from FreeCAD import Units

if dim == 'Length':
qty = FreeCAD.Units.Quantity(internValue,FreeCAD.Units.Length)
pref = qty.getUserPreferred()
Expand All @@ -150,6 +151,7 @@ def displayExternal(internValue,decimals=4,dim='Length',showUnit=True):
uom = ""
fmt = "{0:."+ str(decimals) + "f} "+ uom
displayExt = fmt.format(float(internValue) / float(conversion))
displayExt = displayExt.replace(".",QtCore.QLocale().decimalPoint())
return displayExt

#---------------------------------------------------------------------------
Expand Down

0 comments on commit 463b5d4

Please sign in to comment.