From 603c0a789e93a1cd4e2e26fcd4c1598916a0efbc Mon Sep 17 00:00:00 2001 From: Florian Festi Date: Sat, 24 Aug 2019 23:01:27 +0200 Subject: [PATCH] Inkscape plugin: Set precision for float arguments to 2 Resolves: #167 --- scripts/boxes2inkscape | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/scripts/boxes2inkscape b/scripts/boxes2inkscape index b3ffd87..472c7ae 100755 --- a/scripts/boxes2inkscape +++ b/scripts/boxes2inkscape @@ -70,11 +70,11 @@ class Boxes2INX: elif a.type is boxes.argparseSections: t = "string" else: - t = { int : "int", - float : "float", - str : "string", - }.get(a.type, "string") - return ''' %s\n''' % (name, t, viewname, quoteattr(a.help or ""), a.default) + t = { int : '"int"', + float : '"float" precision="2"', + str : '"string"', + }.get(a.type, '"string"') + return ''' %s\n''' % (name, t, viewname, quoteattr(a.help or ""), a.default) def generator2inx(self, name, box): result = [ """