mailr19520 - in /branches/relax_disp: ./ gui/analyses/auto_rx_base.py 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 April 21, 2013 - 00:45:
Author: bugman
Date: Sun Apr 21 00:45:58 2013
New Revision: 19520

URL: http://svn.gna.org/viewcvs/relax?rev=19520&view=rev
Log:
Merged revisions 19518-19519 via svnmerge from 
svn+ssh://bugman@xxxxxxxxxxx/svn/relax/trunk

........
  r19518 | bugman | 2013-04-21 00:37:04 +0200 (Sun, 21 Apr 2013) | 5 lines
  
  Bug fix for the right click popup menu in the spectra list GUI element.
  
  This affects the NOE, R1, and R2 analyses.  The actions of the menu items 
were all mixed up.
........
  r19519 | bugman | 2013-04-21 00:44:54 +0200 (Sun, 21 Apr 2013) | 3 lines
  
  The relaxation time part of the spectra list GUI element can now be turned 
on or off.
........

Modified:
    branches/relax_disp/   (props changed)
    branches/relax_disp/gui/analyses/auto_rx_base.py
    branches/relax_disp/gui/components/spectrum.py

Propchange: branches/relax_disp/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Sun Apr 21 00:45:58 2013
@@ -1,1 +1,1 @@
-/trunk:1-19514
+/trunk:1-19519

Modified: branches/relax_disp/gui/analyses/auto_rx_base.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/relax_disp/gui/analyses/auto_rx_base.py?rev=19520&r1=19519&r2=19520&view=diff
==============================================================================
--- branches/relax_disp/gui/analyses/auto_rx_base.py (original)
+++ branches/relax_disp/gui/analyses/auto_rx_base.py Sun Apr 21 00:45:58 2013
@@ -219,7 +219,7 @@
 
         # Add the peak list selection GUI element, with spacing.
         box.AddSpacer(20)
-        self.peak_intensity = Spectra_list(gui=self.gui, parent=self, 
box=box, id=str(self.data_index), fn_add=self.peak_wizard)
+        self.peak_intensity = Spectra_list(gui=self.gui, parent=self, 
box=box, id=str(self.data_index), fn_add=self.peak_wizard, relax_times=True)
         box.AddSpacer(10)
 
         # The optimisation settings.

Modified: branches/relax_disp/gui/components/spectrum.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/relax_disp/gui/components/spectrum.py?rev=19520&r1=19519&r2=19520&view=diff
==============================================================================
--- branches/relax_disp/gui/components/spectrum.py (original)
+++ branches/relax_disp/gui/components/spectrum.py Sun Apr 21 00:45:58 2013
@@ -45,7 +45,7 @@
 class Spectra_list(Base_list):
     """The GUI element for listing loaded spectral data."""
 
-    def __init__(self, gui=None, parent=None, box=None, id=None, 
fn_add=None, proportion=0, button_placement='default'):
+    def __init__(self, gui=None, parent=None, box=None, id=None, 
fn_add=None, proportion=0, button_placement='default', relax_times=False):
         """Build the spectral list GUI element.
 
         @keyword gui:               The main GUI object.
@@ -64,10 +64,13 @@
         @type proportion:           bool
         @keyword button_placement:  Override the button visibility and 
placement.  The value of 'default' will leave the buttons at the default 
setting.  The value of 'top' will place the buttons at the top, 'bottom' will 
place them at the bottom, and None will turn off the buttons.
         @type button_placement:     str or None
+        @keyword relax_times:       A flag which if True will activate the 
relaxation time parts of the GUI element.
+        @type relax_times:          bool
         """
 
         # Store the arguments.
         self.fn_add = fn_add
+        self.relax_times_flag = relax_times
 
         # Initialise the base class.
         super(Spectra_list, self).__init__(gui=gui, parent=parent, box=box, 
id=id, proportion=proportion, button_placement=button_placement)
@@ -321,29 +324,31 @@
                 'id': wx.NewId(),
                 'text': "Set the &baseplane RMSD",
                 'icon': 
fetch_icon(uf_info.get_uf('spectrum.baseplane_rmsd').gui_icon),
-                'method': self.action_relax_fit_relax_time
+                'method': self.action_spectrum_baseplane_rmsd
             }, {
                 'id': wx.NewId(),
                 'text': "&Delete the peak intensities",
                 'icon': 
fetch_icon(uf_info.get_uf('spectrum.delete').gui_icon),
-                'method': self.action_spectrum_baseplane_rmsd
+                'method': self.action_spectrum_delete
             }, {
                 'id': wx.NewId(),
                 'text': "Set the number of integration &points",
                 'icon': 
fetch_icon(uf_info.get_uf('spectrum.integration_points').gui_icon),
-                'method': self.action_spectrum_delete
+                'method': self.action_spectrum_integration_points
             }, {
                 'id': wx.NewId(),
                 'text': "Specify which spectra are &replicated",
                 'icon': 
fetch_icon(uf_info.get_uf('spectrum.replicated').gui_icon),
-                'method': self.action_spectrum_integration_points
-            }, {
-                'id': wx.NewId(),
-                'text': "Set the relaxation &time",
-                'icon': 
fetch_icon(uf_info.get_uf('relax_fit.relax_time').gui_icon),
                 'method': self.action_spectrum_replicated
             }
         ]
+        if self.relax_times_flag:
+            self.popup_menus.append({
+                'id': wx.NewId(),
+                'text': "Set the relaxation &time",
+                'icon': 
fetch_icon(uf_info.get_uf('relax_fit.relax_time').gui_icon),
+                'method': self.action_relax_fit_relax_time
+            })
 
 
     def update_data(self):
@@ -374,7 +379,7 @@
             index += 1
 
         # The relaxation times.
-        if self.relax_times(index):
+        if self.relax_times_flag and self.relax_times(index):
             index += 1
 
         # The replicated spectra.




Related Messages


Powered by MHonArc, Updated Sun Apr 21 12:00:02 2013