mailr14575 - in /1.3/gui/user_functions: grace.py molecule.py residue.py sequence.py spectrum.py spin.py value.py


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

Header


Content

Posted by edward on September 02, 2011 - 12:25:
Author: bugman
Date: Fri Sep  2 12:25:54 2011
New Revision: 14575

URL: http://svn.gna.org/viewcvs/relax?rev=14575&view=rev
Log:
Fixes for many user function GUI pages for when the apply button is clicked.

The combo box GUI elements were having data appended each time on_display() 
is called (this happens
with a click on the apply button), but the previous values were not cleared 
out.  This results in
very long repetitive lists.


Modified:
    1.3/gui/user_functions/grace.py
    1.3/gui/user_functions/molecule.py
    1.3/gui/user_functions/residue.py
    1.3/gui/user_functions/sequence.py
    1.3/gui/user_functions/spectrum.py
    1.3/gui/user_functions/spin.py
    1.3/gui/user_functions/value.py

Modified: 1.3/gui/user_functions/grace.py
URL: 
http://svn.gna.org/viewcvs/relax/1.3/gui/user_functions/grace.py?rev=14575&r1=14574&r2=14575&view=diff
==============================================================================
--- 1.3/gui/user_functions/grace.py (original)
+++ 1.3/gui/user_functions/grace.py Fri Sep  2 12:25:54 2011
@@ -216,7 +216,8 @@
             self.setup_fail = True
             return
 
-        # First add the sequence data.
+        # First clear and then add the sequence data.
+        combo_box.Clear()
         combo_box.Append(str_to_gui("Spin sequence"), 'spin')
 
         # Loop over the parameters.

Modified: 1.3/gui/user_functions/molecule.py
URL: 
http://svn.gna.org/viewcvs/relax/1.3/gui/user_functions/molecule.py?rev=14575&r1=14574&r2=14575&view=diff
==============================================================================
--- 1.3/gui/user_functions/molecule.py (original)
+++ 1.3/gui/user_functions/molecule.py Fri Sep  2 12:25:54 2011
@@ -124,6 +124,10 @@
             self.pipe_from.SetValue(str_to_gui(cdp_name()))
         if not gui_to_str(self.pipe_to.GetValue()):
             self.pipe_to.SetValue(str_to_gui(cdp_name()))
+
+        # Clear the previous data.
+        self.pipe_from.Clear()
+        self.pipe_to.Clear()
 
         # The list of pipe names.
         for name in pipe_names():

Modified: 1.3/gui/user_functions/residue.py
URL: 
http://svn.gna.org/viewcvs/relax/1.3/gui/user_functions/residue.py?rev=14575&r1=14574&r2=14575&view=diff
==============================================================================
--- 1.3/gui/user_functions/residue.py (original)
+++ 1.3/gui/user_functions/residue.py Fri Sep  2 12:25:54 2011
@@ -154,6 +154,10 @@
         if not gui_to_str(self.pipe_to.GetValue()):
             self.pipe_to.SetValue(str_to_gui(cdp_name()))
 
+        # Clear the previous data.
+        self.pipe_from.Clear()
+        self.pipe_to.Clear()
+
         # The list of pipe names.
         for name in pipe_names():
             self.pipe_from.Append(str_to_gui(name))

Modified: 1.3/gui/user_functions/sequence.py
URL: 
http://svn.gna.org/viewcvs/relax/1.3/gui/user_functions/sequence.py?rev=14575&r1=14574&r2=14575&view=diff
==============================================================================
--- 1.3/gui/user_functions/sequence.py (original)
+++ 1.3/gui/user_functions/sequence.py Fri Sep  2 12:25:54 2011
@@ -113,6 +113,10 @@
             self.pipe_from.SetValue(str_to_gui(cdp_name()))
         if not gui_to_str(self.pipe_to.GetValue()):
             self.pipe_to.SetValue(str_to_gui(cdp_name()))
+
+        # Clear the previous data.
+        self.pipe_from.Clear()
+        self.pipe_to.Clear()
 
         # The list of pipe names.
         for name in pipe_names():

Modified: 1.3/gui/user_functions/spectrum.py
URL: 
http://svn.gna.org/viewcvs/relax/1.3/gui/user_functions/spectrum.py?rev=14575&r1=14574&r2=14575&view=diff
==============================================================================
--- 1.3/gui/user_functions/spectrum.py (original)
+++ 1.3/gui/user_functions/spectrum.py Fri Sep  2 12:25:54 2011
@@ -136,6 +136,9 @@
     def on_display(self):
         """Update the UI."""
 
+        # Clear the previous data.
+        self.spectrum_id.Clear()
+
         # Set the spectrum ID names.
         if hasattr(cdp, 'spectrum_ids'):
             for id in cdp.spectrum_ids:
@@ -204,6 +207,9 @@
 
     def on_display(self):
         """Update the UI."""
+
+        # Clear the previous data.
+        self.spectrum_id.Clear()
 
         # Set the spectrum ID names.
         if hasattr(cdp, 'spectrum_ids'):

Modified: 1.3/gui/user_functions/spin.py
URL: 
http://svn.gna.org/viewcvs/relax/1.3/gui/user_functions/spin.py?rev=14575&r1=14574&r2=14575&view=diff
==============================================================================
--- 1.3/gui/user_functions/spin.py (original)
+++ 1.3/gui/user_functions/spin.py Fri Sep  2 12:25:54 2011
@@ -245,6 +245,10 @@
         if not gui_to_str(self.pipe_to.GetValue()):
             self.pipe_to.SetValue(str_to_gui(cdp_name()))
 
+        # Clear the previous data.
+        self.pipe_from.Clear()
+        self.pipe_to.Clear()
+
         # The list of pipe names.
         for name in pipe_names():
             self.pipe_from.Append(str_to_gui(name))

Modified: 1.3/gui/user_functions/value.py
URL: 
http://svn.gna.org/viewcvs/relax/1.3/gui/user_functions/value.py?rev=14575&r1=14574&r2=14575&view=diff
==============================================================================
--- 1.3/gui/user_functions/value.py (original)
+++ 1.3/gui/user_functions/value.py Fri Sep  2 12:25:54 2011
@@ -189,6 +189,9 @@
             self.setup_fail = True
             return
 
+        # Clear the previous data.
+        self.param.Clear()
+
         # Loop over the parameters.
         for name in (data_names(set='params') + data_names(set='generic')):
             # Get the description.




Related Messages


Powered by MHonArc, Updated Fri Sep 02 15:00:02 2011