mailr14601 - /1.3/gui/spin_viewer/tree.py


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

Header


Content

Posted by edward on September 06, 2011 - 17:41:
Author: bugman
Date: Tue Sep  6 17:41:42 2011
New Revision: 14601

URL: http://svn.gna.org/viewcvs/relax?rev=14601&view=rev
Log:
Fix for the spin viewer window for MS Windows.

The get_info() method now catches if no item is selected in the tree before 
trying to get the Python
data from it.  Asking for Python data from a missing TreeCtrl item ID works 
on GNU/Linux and Mac OS
X, but not on MS Windows.


Modified:
    1.3/gui/spin_viewer/tree.py

Modified: 1.3/gui/spin_viewer/tree.py
URL: 
http://svn.gna.org/viewcvs/relax/1.3/gui/spin_viewer/tree.py?rev=14601&r1=14600&r2=14601&view=diff
==============================================================================
--- 1.3/gui/spin_viewer/tree.py (original)
+++ 1.3/gui/spin_viewer/tree.py Tue Sep  6 17:41:42 2011
@@ -324,6 +324,10 @@
         # The current item.
         item = self.tree.GetSelection()
 
+        # No data.
+        if not item.IsOk():
+            return
+
         # Return the associated python data.
         return self.tree.GetItemPyData(item)
 




Related Messages


Powered by MHonArc, Updated Tue Sep 06 18:00:02 2011