Author: bugman Date: Fri Jul 1 21:03:20 2011 New Revision: 13402 URL: http://svn.gna.org/viewcvs/relax?rev=13402&view=rev Log: The pipe.switch() user function is now only called in the spin viewer if a different pipe is selected. Modified: branches/gui_testing/gui/components/spin_view.py Modified: branches/gui_testing/gui/components/spin_view.py URL: http://svn.gna.org/viewcvs/relax/branches/gui_testing/gui/components/spin_view.py?rev=13402&r1=13401&r2=13402&view=diff ============================================================================== --- branches/gui_testing/gui/components/spin_view.py (original) +++ branches/gui_testing/gui/components/spin_view.py Fri Jul 1 21:03:20 2011 @@ -1009,9 +1009,17 @@ @type event: wx event """ + # Init. + pipe_switch = False + # The selected pipe. if event: + # The name of the selected pipe. pipe = str(event.GetString()) + + # A pipe change. + if pipe != cdp_name(): + pipe_switch = True else: pipe = cdp_name() if not pipe: @@ -1025,7 +1033,7 @@ self.pipe_name.Append(name) # Switch. - if pipe: + if pipe_switch: # Switch data pipes. self.gui.user_functions.interpreter.pipe.switch(pipe)