Author: bugman Date: Wed May 30 20:04:54 2012 New Revision: 16541 URL: http://svn.gna.org/viewcvs/relax?rev=16541&view=rev Log: The Value GUI input element UpdateChoices() method now handles non-selection strings in the ComboBox. The SetStringSelection() method is now only used when the combo default is one of the choices, and SetValue() when not in the list of choices. Modified: branches/uf_redesign/gui/input_elements/value.py Modified: branches/uf_redesign/gui/input_elements/value.py URL: http://svn.gna.org/viewcvs/relax/branches/uf_redesign/gui/input_elements/value.py?rev=16541&r1=16540&r2=16541&view=diff ============================================================================== --- branches/uf_redesign/gui/input_elements/value.py (original) +++ branches/uf_redesign/gui/input_elements/value.py Wed May 30 20:04:54 2012 @@ -370,13 +370,21 @@ # Translate if needed. if combo_default in combo_choices: string = combo_default + set_sel = True elif combo_default not in combo_data: string = combo_default + set_sel = False else: string = combo_choices[combo_data.index(combo_default)] + set_sel = True # Set the selection. - self._field.SetStringSelection(string) + if set_sel: + self._field.SetStringSelection(string) + + # Set the value. + else: + self._field.SetValue(string) # Restore the selection. else: