mailr14561 - /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 September 01, 2011 - 11:51:
Author: bugman
Date: Thu Sep  1 11:51:13 2011
New Revision: 14561

URL: http://svn.gna.org/viewcvs/relax?rev=14561&view=rev
Log:
Fix for the size_cols() method of the spectrum list GUI element.

With the asynchronous updating of the element, sometimes the columns are not 
setup prior to a
size_cols() call.


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=14561&r1=14560&r2=14561&view=diff
==============================================================================
--- 1.3/gui/components/spectrum.py (original)
+++ 1.3/gui/components/spectrum.py Thu Sep  1 11:51:13 2011
@@ -367,7 +367,10 @@
         n = self.element.GetColumnCount()
 
         # Set to equal sizes.
-        width = int(x / n)
+        if n == 0:
+            width = x
+        else:
+            width = int(x / n)
 
         # Set the column sizes.
         for i in range(n):




Related Messages


Powered by MHonArc, Updated Thu Sep 01 12:00:01 2011