Author: bugman Date: Fri Apr 13 14:16:36 2012 New Revision: 15703 URL: http://svn.gna.org/viewcvs/relax?rev=15703&view=rev Log: Fix for the spin viewer window for wxPython 2.9.3.1. This 2.9 fix is for when you right click in the tree view panel on nothing, and is compatible with wxPython 2.8. This fix will be required for the Mac application which will use this version. 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=15703&r1=15702&r2=15703&view=diff ============================================================================== --- 1.3/gui/spin_viewer/tree.py (original) +++ 1.3/gui/spin_viewer/tree.py Fri Apr 13 14:16:36 2012 @@ -1,6 +1,6 @@ ############################################################################### # # -# Copyright (C) 2010-2011 Edward d'Auvergne # +# Copyright (C) 2010-2012 Edward d'Auvergne # # # # This file is part of the program relax. # # # @@ -149,8 +149,11 @@ # Find the item clicked on. item, flags = self.tree.HitTest(pos) - # The python data. - self.info = self.tree.GetItemPyData(item) + # The python data (with catch for wxPython 2.9 behaviour). + if not item.IsOk(): + self.info = None + else: + self.info = self.tree.GetItemPyData(item) # Bring up the default menu. if self.info == None: