mailr16358 - /branches/uf_redesign/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 May 21, 2012 - 22:35:
Author: bugman
Date: Mon May 21 22:35:09 2012
New Revision: 16358

URL: http://svn.gna.org/viewcvs/relax?rev=16358&view=rev
Log:
Fix for the SetValue() method of the Combo_list GUI input element.

This was not operating correctly if the index keyword was not being supplied.


Modified:
    branches/uf_redesign/gui/input_elements/combo_list.py

Modified: branches/uf_redesign/gui/input_elements/combo_list.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/uf_redesign/gui/input_elements/combo_list.py?rev=16358&r1=16357&r2=16358&view=diff
==============================================================================
--- branches/uf_redesign/gui/input_elements/combo_list.py (original)
+++ branches/uf_redesign/gui/input_elements/combo_list.py Mon May 21 22:35:09 
2012
@@ -351,7 +351,11 @@
         """
 
         # Single element.
-        if index != None:
+        if not isinstance(value, list):
+            # The index default.
+            if index == None:
+                index = 0
+
             # Add elements as needed.
             if len(self._combo_boxes) <= index:
                 for i in range(len(self._combo_boxes) - index + 1):
@@ -377,5 +381,3 @@
                     if self._combo_boxes[i].GetClientData(j) == value:
                         self._combo_boxes[i].SetSelection(j)
                         break
-
-




Related Messages


Powered by MHonArc, Updated Mon May 21 22:40:02 2012