mailr13628 - /branches/gui_testing/gui/analyses/__init__.py


Others Months | Index by Date | Thread Index
>>   [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Header


Content

Posted by edward on July 14, 2011 - 17:51:
Author: bugman
Date: Thu Jul 14 17:51:33 2011
New Revision: 13628

URL: http://svn.gna.org/viewcvs/relax?rev=13628&view=rev
Log:
Better handling of the opening of analyses from a saved state.

The tabs are not all switched to as they are created, and only at the end is 
there a switch to the
page matching the current data pipe.


Modified:
    branches/gui_testing/gui/analyses/__init__.py

Modified: branches/gui_testing/gui/analyses/__init__.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/gui_testing/gui/analyses/__init__.py?rev=13628&r1=13627&r2=13628&view=diff
==============================================================================
--- branches/gui_testing/gui/analyses/__init__.py (original)
+++ branches/gui_testing/gui/analyses/__init__.py Thu Jul 14 17:51:33 2011
@@ -212,7 +212,10 @@
                 analysis_name = 'Model-free'
 
             # Set up the analysis.
-            self.new_analysis(map[ds.relax_gui.analyses[i].analysis_type], 
analysis_name, index=i)
+            self.new_analysis(map[ds.relax_gui.analyses[i].analysis_type], 
analysis_name, index=i, switch=False)
+
+        # Switch to the page of the current data pipe.
+        self.pipe_switch()
 
 
     def menu_close(self, event):
@@ -275,7 +278,7 @@
         del self.new_wizard
 
 
-    def new_analysis(self, analysis_type=None, analysis_name=None, 
pipe_name=None, index=None):
+    def new_analysis(self, analysis_type=None, analysis_name=None, 
pipe_name=None, index=None, switch=True):
         """Initialise a new analysis.
 
         @keyword analysis_type: The type of analysis to initialise.  This 
can be one of 'noe', 'r1', 'r2', or 'mf'.
@@ -284,6 +287,8 @@
         @type analysis_name:    str
         @keyword index:         The index of the analysis in the relax data 
store (set to None if no data currently exists).
         @type index:            None or int
+        @keyword switch:        A flag which if True will cause the new page 
to be switched to.
+        @type switch:           bool
         """
 
         # Starting from the initial state.
@@ -341,7 +346,8 @@
         self._num_analyses += 1
 
         # Switch to the new page.
-        self.switch_page(self._num_analyses-1)
+        if switch:
+            self.switch_page(self._num_analyses-1)
 
         # Set the initialisation flag.
         self.init_state = False




Related Messages


Powered by MHonArc, Updated Thu Jul 14 18:20:02 2011