mailr13767 - /branches/gui_testing/gui/components/spectrum.py


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

Header


Content

Posted by edward on July 20, 2011 - 11:07:
Author: bugman
Date: Wed Jul 20 11:07:04 2011
New Revision: 13767

URL: http://svn.gna.org/viewcvs/relax?rev=13767&view=rev
Log:
The spectrum list GUI element noe_spectrum_type() and relax_times() methods 
now return correctly.

They now return True if a column has been added.


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

Modified: branches/gui_testing/gui/components/spectrum.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/gui_testing/gui/components/spectrum.py?rev=13767&r1=13766&r2=13767&view=diff
==============================================================================
--- branches/gui_testing/gui/components/spectrum.py (original)
+++ branches/gui_testing/gui/components/spectrum.py Wed Jul 20 11:07:04 2011
@@ -239,7 +239,7 @@
         """
 
         # No type info.
-        if not hasattr(cdp, 'spectrum_type'):
+        if not hasattr(cdp, 'spectrum_type') or not len(cdp.spectrum_type):
             return False
 
         # Append a column.
@@ -255,7 +255,6 @@
         }
 
         # Set the values.
-        flag = False
         for i in range(len(cdp.spectrum_ids)):
             # No value.
             if cdp.spectrum_ids[i] not in cdp.spectrum_type.keys():
@@ -264,8 +263,8 @@
             # Set the value.
             self.grid.SetCellValue(i, index, 
table[cdp.spectrum_type[cdp.spectrum_ids[i]]])
 
-            # Flip the flag.
-            flag = True
+        # Successful.
+        return True
 
 
     def relax_times(self, index):
@@ -296,6 +295,9 @@
             # Set the value.
             self.grid.SetCellValue(i, index, 
float_to_gui(cdp.relax_times[cdp.spectrum_ids[i]]))
 
+        # Successful.
+        return True
+
 
     def size_cols(self):
         """Set the column sizes."""




Related Messages


Powered by MHonArc, Updated Wed Jul 20 11:40:01 2011