Author: bugman Date: Fri Jan 29 11:09:03 2010 New Revision: 10575 URL: http://svn.gna.org/viewcvs/relax?rev=10575&view=rev Log: The list_count variable (for the number of peak lists) is now kept in the relax data store. The value is currently hardcoded, and the file_list and relax_times objects appropriately updated. Modified: branches/bieri_gui/gui_bieri/analyses/auto_rx_base.py Modified: branches/bieri_gui/gui_bieri/analyses/auto_rx_base.py URL: http://svn.gna.org/viewcvs/relax/branches/bieri_gui/gui_bieri/analyses/auto_rx_base.py?rev=10575&r1=10574&r2=10575&view=diff ============================================================================== --- branches/bieri_gui/gui_bieri/analyses/auto_rx_base.py (original) +++ branches/bieri_gui/gui_bieri/analyses/auto_rx_base.py Fri Jan 29 11:09:03 2010 @@ -64,6 +64,11 @@ # Alias the storage container in the relax data store. self.data = ds.relax_gui.analyses[hardcoded_index] + + # Hardcoded class variables. + self.data.list_count = 14 # The number of peak list elements. + self.data.file_list = [''] * self.data.list_count + self.data.relax_times = [None] * self.data.list_count # The parent GUI element for this class. self.parent = wx.Panel(notebook, -1) @@ -279,13 +284,11 @@ box.Add(sizer, 0, wx.EXPAND|wx.SHAPED, 0) - def add_peak_list_selection(self, box, list_count=14): + def add_peak_list_selection(self, box): """Create and add the peak list selection GUI element to the given box. @param box: The box element to pack the peak list selection GUI element into. @type box: wx.BoxSizer instance - @keyword list_count: The number of peak lists elements to add to the grid. - @type list_count: int """ # The background panel (only used for layout purposes). @@ -339,7 +342,7 @@ # Build the grid of file names and relaxation times. self.r1_list = [] self.r1_time = [] - for i in range(1, list_count+1): + for i in range(1, self.data.list_count+1): # The peak list file name GUI elements. self.r1_list.append(wx.StaticText(panel_grid, -1, "")) sizer_grid.Add(self.r1_list[-1], 0, wx.ADJUST_MINSIZE, 0)