mailr12902 - /1.3/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 June 09, 2011 - 08:43:
Author: bugman
Date: Thu Jun  9 08:43:04 2011
New Revision: 12902

URL: http://svn.gna.org/viewcvs/relax?rev=12902&view=rev
Log:
Fixed the behaviour of the number of cycles column in the Rx tab grid.

Deleting or not entering a number was causing '1' to appear in the cell!


Modified:
    1.3/gui/components/spectrum.py

Modified: 1.3/gui/components/spectrum.py
URL: 
http://svn.gna.org/viewcvs/relax/1.3/gui/components/spectrum.py?rev=12902&r1=12901&r2=12902&view=diff
==============================================================================
--- 1.3/gui/components/spectrum.py (original)
+++ 1.3/gui/components/spectrum.py Thu Jun  9 08:43:04 2011
@@ -143,8 +143,12 @@
         if value == self.prev_val:
             return False
 
-        # Set the value in the table.
-        grid.GetTable().SetValue(row, col, str(value))
+        # Set the value in the table (the value of zero shows nothing).
+        if value == 0:
+            text = ''
+        else:
+            text = str(value)
+        grid.GetTable().SetValue(row, col, text)
 
         # The delay cycle time.
         time = self.parent.delay_time.GetValue()
@@ -160,7 +164,6 @@
 
         # A change occurred.
         return True
-
 
 
     def Reset(self):
@@ -354,7 +357,7 @@
         # Column properties.
         for i in range(self.grid.GetNumberRows()):
             # Set the editor for the number of cycles column.
-            self.grid.SetCellEditor(i, 1, Delay_num_cell_editor(1, 200, 
self))
+            self.grid.SetCellEditor(i, 1, Delay_num_cell_editor(0, 200, 
self))
 
             # Make the relaxation delay column read only.
             self.grid.SetReadOnly(i, 2)




Related Messages


Powered by MHonArc, Updated Thu Jun 09 09:00:01 2011