mailr18074 - /trunk/gui/input_elements/combo_list.py


Others Months | Index by Date | Thread Index
>>   [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Header


Content

Posted by edward on December 06, 2012 - 18:34:
Author: bugman
Date: Thu Dec  6 18:34:56 2012
New Revision: 18074

URL: http://svn.gna.org/viewcvs/relax?rev=18074&view=rev
Log:
Bug fix for the GUI combo_list input element SetValue() method.

Values not belonging to the combo lists can now be set.  This fixes the 
spin.create_pseudo user
function in the test suite, a bug triggered by the 
N_state_model.test_absolute_rdc_menthol GUI test.


Modified:
    trunk/gui/input_elements/combo_list.py

Modified: trunk/gui/input_elements/combo_list.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/gui/input_elements/combo_list.py?rev=18074&r1=18073&r2=18074&view=diff
==============================================================================
--- trunk/gui/input_elements/combo_list.py (original)
+++ trunk/gui/input_elements/combo_list.py Thu Dec  6 18:34:56 2012
@@ -351,10 +351,16 @@
             # Loop over the list.
             for i in range(len(value)):
                 # Loop until the proper client data is found.
+                found = False
                 for j in range(self._combo_boxes[i].GetCount()):
                     if self._combo_boxes[i].GetClientData(j) == value[i]:
                         self._combo_boxes[i].SetSelection(j)
+                        found = True
                         break
+
+                # Otherwise set the value.
+                if not found:
+                    self._combo_boxes[i].SetValue(value[i])
 
 
     def UpdateChoices(self, combo_choices=None, combo_data=None, 
combo_default=None):




Related Messages


Powered by MHonArc, Updated Fri Dec 07 10:40:02 2012