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()) ) #------------------------------------------------------------------------- #