Draft: display coordinates using the current locale's decimal separator - fixes #1741
This commit is contained in:
parent
e820a32653
commit
463b5d4a7e
|
@ -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()
|
||||
|
@ -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
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
|
|
Loading…
Reference in New Issue
Block a user