mailr21216 - /branches/relax_disp/gui/components/spectrum.py


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

Header


Content

Posted by edward on October 22, 2013 - 19:11:
Author: bugman
Date: Tue Oct 22 19:11:51 2013
New Revision: 21216

URL: http://svn.gna.org/viewcvs/relax?rev=21216&view=rev
Log:
Fix for the right click pop up menu entry "Set the spin-lock field" in the 
dispersion GUI tab.

This is for the spectra list relax_disp.spin_lock_field user function call.  
The reference spectra
are now detected and the field value set to None.  This fix has been 
propagated to the
relax_disp.cpmg_frq user function menu entry as well.


Modified:
    branches/relax_disp/gui/components/spectrum.py

Modified: branches/relax_disp/gui/components/spectrum.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/relax_disp/gui/components/spectrum.py?rev=21216&r1=21215&r2=21216&view=diff
==============================================================================
--- branches/relax_disp/gui/components/spectrum.py (original)
+++ branches/relax_disp/gui/components/spectrum.py Tue Oct 22 19:11:51 2013
@@ -97,14 +97,16 @@
 
         # The current frequency.
         frq = None
+        frq_flag = False
         if hasattr(cdp, 'cpmg_frqs') and id in cdp.cpmg_frqs.keys():
             frq = cdp.cpmg_frqs[id]
-
-        # Launch the dialog.
-        if frq == None:
+            frq_flag = True
+
+        # Launch the dialog.
+        if frq_flag:
+            uf_store['relax_disp.cpmg_frq'](cpmg_frq=frq, spectrum_id=id)
+        else:
             uf_store['relax_disp.cpmg_frq'](spectrum_id=id)
-        else:
-            uf_store['relax_disp.cpmg_frq'](cpmg_frq=frq, spectrum_id=id)
 
 
     def action_relax_disp_exp_type(self, event=None, item=None):
@@ -181,14 +183,16 @@
 
         # The spin-lock.
         nu1 = None
+        nu1_flag = False
         if hasattr(cdp, 'spin_lock_nu1') and id in cdp.spin_lock_nu1.keys():
             nu1 = cdp.spin_lock_nu1[id]
-
-        # Launch the dialog.
-        if nu1 == None:
+            nu1_flag = True
+
+        # Launch the dialog.
+        if nu1_flag:
+            uf_store['relax_disp.spin_lock_field'](field=nu1, spectrum_id=id)
+        else:
             uf_store['relax_disp.spin_lock_field'](spectrum_id=id)
-        else:
-            uf_store['relax_disp.spin_lock_field'](field=nu1, spectrum_id=id)
 
 
     def action_relax_fit_relax_time(self, event=None, item=None):




Related Messages


Powered by MHonArc, Updated Tue Oct 22 20:20:06 2013