From 463b5d4a7e263315fde645239899bc995d6846c9 Mon Sep 17 00:00:00 2001 From: Yorik van Havre Date: Sat, 27 Sep 2014 16:23:59 -0300 Subject: [PATCH] Draft: display coordinates using the current locale's decimal separator - fixes #1741 --- src/Mod/Draft/DraftGui.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/Mod/Draft/DraftGui.py b/src/Mod/Draft/DraftGui.py index 8439aad4a..ae7aa71ac 100644 --- a/src/Mod/Draft/DraftGui.py +++ b/src/Mod/Draft/DraftGui.py @@ -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 #---------------------------------------------------------------------------