From 79174e71142f3be74c0f7ed915a61f9debba6141 Mon Sep 17 00:00:00 2001 From: Brian Matherly Date: Mon, 28 Jan 2008 05:12:09 +0000 Subject: [PATCH] Fix 0001659: NumberOption fields on report dialogs svn: r9941 --- ChangeLog | 4 ++++ src/PluginUtils/_GuiOptions.py | 6 ++++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index f2ba3982c..2cddd928b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2008-01-27 Brian Matherly + * src/PluginUtils/_GuiOptions.py: + Fix 0001659: NumberOption fields on report dialogs + 2008-01-27 Brian Matherly * src/ReportBase/_GraphvizReportDialog.py: Fix 0001656: New menu item diff --git a/src/PluginUtils/_GuiOptions.py b/src/PluginUtils/_GuiOptions.py index 4e4a50b99..c712d0b63 100644 --- a/src/PluginUtils/_GuiOptions.py +++ b/src/PluginUtils/_GuiOptions.py @@ -219,16 +219,18 @@ class GuiNumberOption(gtk.SpinButton): decimals = int(math.log10(step) * -1) gtk.SpinButton.__init__(self, adj, digits=decimals) + gtk.SpinButton.set_numeric(self, True) self.set_value(self.__option.get_value()) - self.connect('changed', self.__value_changed) + self.connect('value_changed', self.__value_changed) tooltip.set_tip(self, self.__option.get_help()) def __value_changed(self, obj): # IGNORE:W0613 - obj is unused """ Handle the change of the value. """ - self.__option.set_value( int(self.get_value_as_int()) ) + vtype = type(self.__option.get_value()) + self.__option.set_value( vtype(self.get_value()) ) #------------------------------------------------------------------------- #