Author: bugman Date: Fri Jan 29 11:30:41 2010 New Revision: 10577 URL: http://svn.gna.org/viewcvs/relax?rev=10577&view=rev Log: Shifted the hardcoded peak list element count from the relax data storing into the class namespace. The file_list and relax_times structures should be dynamically updated with the 'Add' and 'Refresh' buttons. 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=10577&r1=10576&r2=10577&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:30:41 2010 @@ -66,9 +66,7 @@ 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 + self.peak_list_count = 14 # The number of peak list elements. # The parent GUI element for this class. self.parent = wx.Panel(notebook, -1) @@ -342,7 +340,7 @@ # Build the grid of file names and relaxation times. self.r1_list = [] self.r1_time = [] - for i in range(1, self.data.list_count+1): + for i in range(1, self.peak_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) @@ -641,14 +639,14 @@ # The peak lists and relaxation times. if upload: - for i in range(self.data.list_count): + for i in range(self.peak_list_count): # The file name. self.data.file_list[i] = str(self.r1_list[i]) # The relaxation time. self.data.relax_times[i] = str(self.r1_time[i].GetValue()) else: - for i in range(self.data.list_count): + for i in range(self.peak_list_count): # The file name. self.r1_list[i] = str(self.data.file_list[i])