Allow negative value in search widget for issue262

This commit is contained in:
Cédric Krier committed 2008-08-20 11:15:19 +02:00
1 parent 5777bab1a5
commit fa77be2752
2 files changed
+4

No files matched your search

@@ -45,6 +45,8 @@ class Float(Integer):
position = widget.get_position()
new_value = value[:position] + new_text + value[position:]
try:
if new_value == '-':
return
if len(str(int(locale.atof(new_value)))) > self.digits[0]:
widget.stop_emission('insert-text')
except:
@@ -77,6 +77,8 @@ class Integer(Interface):
position = widget.get_position()
new_value = value[:position] + new_text + value[position:]
try:
if new_value == '-':
return
locale.atoi(new_value)
except:
widget.stop_emission('insert-text')