Author: bugman Date: Wed Dec 29 11:06:00 2010 New Revision: 12019 URL: http://svn.gna.org/viewcvs/relax?rev=12019&view=rev Log: The relax controller and spin view windows are created when first called, saving significant start up time. Modified: branches/bieri_gui/gui_bieri/relax_gui.py Modified: branches/bieri_gui/gui_bieri/relax_gui.py URL: http://svn.gna.org/viewcvs/relax/branches/bieri_gui/gui_bieri/relax_gui.py?rev=12019&r1=12018&r2=12019&view=diff ============================================================================== --- branches/bieri_gui/gui_bieri/relax_gui.py (original) +++ branches/bieri_gui/gui_bieri/relax_gui.py Wed Dec 29 11:06:00 2010 @@ -129,12 +129,6 @@ # Build the controller, but don't show it. self.controller = Controller(None, -1, "") - # Build the relax prompt, but don't show it. - self.relax_prompt = Prompt(None, -1, "", parent=self) - - # Build the spin view window, but don't show it. - self.spin_view = Spin_view_window(None, -1, "", parent=self) - rx_data = ds.relax_gui.analyses[self.noe_index[0]] self.frame_1_statusbar = self.CreateStatusBar(3, 0) @@ -563,6 +557,10 @@ @type event: wx event """ + # Build the relax prompt if needed. + if not hasattr(self, 'relax_prompt'): + self.relax_prompt = Prompt(None, -1, "", parent=self) + # Open the window. self.relax_prompt.Show() @@ -573,6 +571,10 @@ @param event: The wx event. @type event: wx event """ + + # Build the spin view window. + if not hasattr(self, 'spin_view'): + self.spin_view = Spin_view_window(None, -1, "", parent=self) # Open the window. self.spin_view.Show()