Author: bugman Date: Fri Aug 5 14:41:55 2011 New Revision: 14178 URL: http://svn.gna.org/viewcvs/relax?rev=14178&view=rev Log: Fix for the relax controller progress gauge for the iteration round in the dauvergne_protocol. The gauge should not be updated if the round is in the initial state of None. Modified: branches/gui_testing/gui/controller.py Modified: branches/gui_testing/gui/controller.py URL: http://svn.gna.org/viewcvs/relax/branches/gui_testing/gui/controller.py?rev=14178&r1=14177&r2=14178&view=diff ============================================================================== --- branches/gui_testing/gui/controller.py (original) +++ branches/gui_testing/gui/controller.py Fri Aug 5 14:41:55 2011 @@ -423,15 +423,17 @@ percent = 100 wx.CallAfter(self.progress_gauge_mf.SetValue, percent) - # Sphere to Ellipsoid Models. + # Sphere to ellipsoid Models. elif status.auto_analysis[key].diff_model in ['sphere', 'prolate', 'oblate', 'ellipsoid']: - # The round as a percentage. - percent = int(100 * (status.auto_analysis[key].round - 1) / status.auto_analysis[key].max_iter) - if percent > 100: - percent = 100 - - # Update the progress bar. - wx.CallAfter(self.progress_gauge_mf.SetValue, percent) + # Check that the round has been set. + if status.auto_analysis[key].round != None: + # The round as a percentage. + percent = int(100 * (status.auto_analysis[key].round - 1) / status.auto_analysis[key].max_iter) + if percent > 100: + percent = 100 + + # Update the progress bar. + wx.CallAfter(self.progress_gauge_mf.SetValue, percent) # Monte Carlo simulations. if status.auto_analysis[key].mc_number: