mailr15903 - /1.3/gui/wizard_elements.py


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

Header


Content

Posted by edward on May 03, 2012 - 16:05:
Author: bugman
Date: Thu May  3 16:05:22 2012
New Revision: 15903

URL: http://svn.gna.org/viewcvs/relax?rev=15903&view=rev
Log:
Simplified the wizard_elements.Base_value ResetChoices() method.

This is an attempt to fix some racing conditions under wxGTK, triggered in 
the test suite.


Modified:
    1.3/gui/wizard_elements.py

Modified: 1.3/gui/wizard_elements.py
URL: 
http://svn.gna.org/viewcvs/relax/1.3/gui/wizard_elements.py?rev=15903&r1=15902&r2=15903&view=diff
==============================================================================
--- 1.3/gui/wizard_elements.py (original)
+++ 1.3/gui/wizard_elements.py Thu May  3 16:05:22 2012
@@ -201,16 +201,13 @@
             # First clear all data.
             self.Clear()
 
-            # Loop over the choices and data, adding both to the element.
+            # The data.
+            if combo_data == None:
+                combo_data = combo_choices
+
+            # Loop over the choices and data, adding both to the end.
             for i in range(len(combo_choices)):
-                # Set the string value.
-                self._field.Append(str_to_gui(combo_choices[i]))
-
-                # Set the data.
-                if combo_data != None:
-                    self._field.SetClientData(i, combo_data[i])
-                else:
-                    self._field.SetClientData(i, combo_choices[i])
+                self._field.Insert(str_to_gui(combo_choices[i]), sys.maxint, 
combo_data[i])
 
             # Set the default selection.
             if combo_default:




Related Messages


Powered by MHonArc, Updated Thu May 03 16:20:01 2012