From 408b2186aea58a41ec26b9d0ca29ecd42df5ef7e Mon Sep 17 00:00:00 2001 From: Paul Pogonyshev Date: Sun, 22 Nov 2009 18:22:23 +0200 Subject: Fix wrong minimum checking in float properties Bug #587637. Test the fix. --- gobject/propertyhelper.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'gobject') diff --git a/gobject/propertyhelper.py b/gobject/propertyhelper.py index 216ceb2..e299273 100644 --- a/gobject/propertyhelper.py +++ b/gobject/propertyhelper.py @@ -224,10 +224,11 @@ class property(object): ptype = self.type if ptype in [TYPE_UINT, TYPE_ULONG, TYPE_UINT64]: return 0 + # Remember that G_MINFLOAT and G_MINDOUBLE are something different. elif ptype == TYPE_FLOAT: - return G_MINFLOAT + return -G_MAXFLOAT elif ptype == TYPE_DOUBLE: - return G_MINDOUBLE + return -G_MAXDOUBLE elif ptype == TYPE_INT: return G_MININT elif ptype == TYPE_LONG: -- cgit