Author: bugman Date: Tue Aug 2 11:18:09 2011 New Revision: 14055 URL: http://svn.gna.org/viewcvs/relax?rev=14055&view=rev Log: Fix for the spectral list GUI element on Mac OS X. The ListCtrl.DeleteColumn() method is faulty on Mac OS X. So instead all columns are deleted in one go, and then the entire thing is created on update. 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=14055&r1=14054&r2=14055&view=diff ============================================================================== --- branches/gui_testing/gui/components/spectrum.py (original) +++ branches/gui_testing/gui/components/spectrum.py Tue Aug 2 11:18:09 2011 @@ -139,8 +139,10 @@ # Delete the rows and columns. self.element.DeleteAllItems() - for i in range(1, self.element.GetColumnCount()): - self.element.DeleteColumn(i) + self.element.DeleteAllColumns() + + # Initialise to a single column. + self.element.InsertColumn(0, str_to_gui("Spectrum ID string")) # Expand the number of rows to match the number of spectrum IDs, and add the IDs. n = 0 @@ -197,9 +199,6 @@ # List of peak list file names and relaxation time. self.element = wx.ListCtrl(self.panel, -1, style=wx.BORDER_SUNKEN|wx.LC_REPORT) - # Initialise to a single column. - self.element.InsertColumn(0, str_to_gui("Spectrum ID string")) - # Properties. self.element.SetFont(font.normal)