mailr14054 - /branches/gui_testing/gui/user_functions/spectrum.py


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

Header


Content

Posted by edward on August 02, 2011 - 10:57:
Author: bugman
Date: Tue Aug  2 10:57:39 2011
New Revision: 14054

URL: http://svn.gna.org/viewcvs/relax?rev=14054&view=rev
Log:
Fix for the spectrum.replicated user function page on Mac OS X.

GetValue() cannot be used on a ComboBox when nothing is selected on a Mac!


Modified:
    branches/gui_testing/gui/user_functions/spectrum.py

Modified: branches/gui_testing/gui/user_functions/spectrum.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/gui_testing/gui/user_functions/spectrum.py?rev=14054&r1=14053&r2=14054&view=diff
==============================================================================
--- branches/gui_testing/gui/user_functions/spectrum.py (original)
+++ branches/gui_testing/gui/user_functions/spectrum.py Tue Aug  2 10:57:39 
2011
@@ -355,11 +355,16 @@
 
         # Get the values.
         val = []
-        val.append(gui_to_str(self.spectrum_id1.GetValue()))
-        val.append(gui_to_str(self.spectrum_id2.GetValue()))
-        val.append(gui_to_str(self.spectrum_id3.GetValue()))
-        val.append(gui_to_str(self.spectrum_id4.GetValue()))
-        val.append(gui_to_str(self.spectrum_id5.GetValue()))
+        if self.spectrum_id1.GetSelection() != wx.NOT_FOUND:
+            val.append(gui_to_str(self.spectrum_id1.GetValue()))
+        if self.spectrum_id2.GetSelection() != wx.NOT_FOUND:
+            val.append(gui_to_str(self.spectrum_id2.GetValue()))
+        if self.spectrum_id3.GetSelection() != wx.NOT_FOUND:
+            val.append(gui_to_str(self.spectrum_id3.GetValue()))
+        if self.spectrum_id4.GetSelection() != wx.NOT_FOUND:
+            val.append(gui_to_str(self.spectrum_id4.GetValue()))
+        if self.spectrum_id5.GetSelection() != wx.NOT_FOUND:
+            val.append(gui_to_str(self.spectrum_id5.GetValue()))
 
         # The ID list.
         spectrum_ids = []




Related Messages


Powered by MHonArc, Updated Tue Aug 02 11:20:02 2011