Author: bugman Date: Wed Jul 13 20:16:10 2011 New Revision: 13606 URL: http://svn.gna.org/viewcvs/relax?rev=13606&view=rev Log: The data pipe now switches on page changes in the notebook. This allows the cdp to match the analysis. 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=13606&r1=13605&r2=13606&view=diff ============================================================================== --- branches/gui_testing/gui/analyses/__init__.py (original) +++ branches/gui_testing/gui/analyses/__init__.py Wed Jul 13 20:16:10 2011 @@ -366,6 +366,13 @@ event.Veto() return + # The index. + self._current = event.GetSelection() + + # Switch to the major data pipe of that page if not the current one. + if pipes.cdp_name() != ds.relax_gui.analyses[self._current].pipe_name: + self.gui.interpreter.pipe.switch(ds.relax_gui.analyses[self._current].pipe_name) + # Normal operation. event.Skip() @@ -393,6 +400,10 @@ if index == None: return + # The page is already active, so do nothing. + if self._current == i: + return + # Switch to the page. self.switch_page(i)