From b078464281efec39f8359a2e56a8b69cbf580425 Mon Sep 17 00:00:00 2001 From: Peter Landgren Date: Sat, 15 Mar 2008 09:08:54 +0000 Subject: [PATCH] Decimal comma/point, Issue 1939, fixed. svn: r10321 --- src/ReportBase/_PaperMenu.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/ReportBase/_PaperMenu.py b/src/ReportBase/_PaperMenu.py index ea67e1577..66dd15522 100644 --- a/src/ReportBase/_PaperMenu.py +++ b/src/ReportBase/_PaperMenu.py @@ -261,8 +261,8 @@ class PaperFrame(gtk.HBox): # How can we distinguish custom size though? if papername == _('Custom Size'): try: - h = float(unicode(self.pheight.get_text())) - w = float(unicode(self.pwidth.get_text())) + h = float(unicode(self.pheight.get_text().replace(",","."))) + w = float(unicode(self.pwidth.get_text().replace(",",".") )) if h <= 1.0 or w <= 1.0: papersize.set_height(29.7) @@ -290,7 +290,7 @@ class PaperFrame(gtk.HBox): for i, margin in enumerate(paper_margins): try: - paper_margins[i] = float(margin) + paper_margins[i] = float(margin.replace(",",".")) paper_margins[i] = paper_margins[i] * self.paper_unit_multiplier paper_margins[i] = max(paper_margins[i], 0) except: @@ -299,8 +299,8 @@ class PaperFrame(gtk.HBox): return paper_margins def get_custom_paper_size(self): - width = float(self.pwidth.get_text() ) * self.paper_unit_multiplier - height = float(self.pheight.get_text()) * self.paper_unit_multiplier + width = float(self.pwidth.get_text().replace(",",".")) * self.paper_unit_multiplier + height = float(self.pheight.get_text().replace(",",".")) * self.paper_unit_multiplier paper_size = [] paper_size.append(max(width, 1.0))