Author: michaelbieri Date: Thu Feb 25 04:43:09 2010 New Revision: 10917 URL: http://svn.gna.org/viewcvs/relax?rev=10917&view=rev Log: The entries of the relaxGUI log windows are limited to 1000 lines. After maximum entries is reached, the window will be refreshed. This is a tryout before slowing down the calculation as discussed with and suggested by Edward d'Auvergne (https://mail.gna.org/public/relax-devel/2010-02/msg00091.html). Modified: branches/bieri_gui/gui_bieri/controller.py Modified: branches/bieri_gui/gui_bieri/controller.py URL: http://svn.gna.org/viewcvs/relax/branches/bieri_gui/gui_bieri/controller.py?rev=10917&r1=10916&r2=10917&view=diff ============================================================================== --- branches/bieri_gui/gui_bieri/controller.py (original) +++ branches/bieri_gui/gui_bieri/controller.py Thu Feb 25 04:43:09 2010 @@ -190,22 +190,15 @@ """ Function to overcome feedback problem of wx.CallAfter() command""" # Maximum allowed number of lines in log window. - max_entries = 1000 - new_entries = '' + max_entries = 10000 # read number of lines in log window. total_entries = self.out.log_panel.GetNumberOfLines() # Shift entries backwards if maximum of line exeeded. if total_entries > max_entries: - # Convert entries to list - list_of_entries = split(self.out.log_panel.GetValue(), '\n') - - for i in range(1, max_entries + 1): - new_entries = new_entries + (list_of_entries[i]) + '\n' - # Reset log window entries - #new_entries = str(list_of_entries) + new_entries = 'Refreshing log window...\n\n' self.out.log_panel.SetValue(new_entries) @@ -213,7 +206,7 @@ global progress # Limit panle entries to max_entries Lines. - #wx.CallAfter(self.limit_entries) + wx.CallAfter(self.limit_entries) # Add new output. wx.CallAfter(self.out.log_panel.AppendText, string)