fix TB when there is no default value for a boolean field in dataForm

This commit is contained in:
Yann Leboulanger 2006-02-05 18:55:17 +00:00
parent 759f6a49f6
commit 149bff2b64
1 changed files with 4 additions and 1 deletions

View File

@ -1719,7 +1719,10 @@ class DataFormWindow:
max = 1
if ctype == 'boolean':
widget = gtk.CheckButton(desc, False)
widget.set_active(self.config[i]['values'][0])
activ = False
if self.config[i].has_key('values'):
activ = self.config[i]['values'][0]
widget.set_active(activ)
widget.connect('toggled', self.on_checkbutton_toggled, i)
max = 2
elif ctype == 'fixed':