From e056626c53db6e078fd790c8b0a72d5974ab1ad7 Mon Sep 17 00:00:00 2001 From: Yorik van Havre Date: Fri, 24 Feb 2012 00:11:17 -0200 Subject: [PATCH] Fixed multi-line texts bug in Draft DXF import --- src/Mod/Draft/importDXF.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/Mod/Draft/importDXF.py b/src/Mod/Draft/importDXF.py index 2ff051287..b3c91cad9 100644 --- a/src/Mod/Draft/importDXF.py +++ b/src/Mod/Draft/importDXF.py @@ -88,6 +88,10 @@ def deformat(text): t = re.sub("è","e",t) t = re.sub("ê","e",t) t = re.sub("í","i",t) + t = re.sub("Á","A",t) + t = re.sub("À","A",t) + t = re.sub("É","E",t) + t = re.sub("È","E",t) # replace degrees, diameters chars t = re.sub('%%d','°',t) t = re.sub('%%c','Ø',t) @@ -687,7 +691,7 @@ def addText(text,attrib=False): lay.addObject(newob) val = deformat(val) #val = val.decode("Latin1").encode("Latin1") - newob.LabelText = val + newob.LabelText = val.split("\n") newob.Position = pos if gui: if fmt.stdSize: