mailr14659 - /1.3/gui/components/relax_data.py


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

Header


Content

Posted by edward on September 16, 2011 - 10:35:
Author: bugman
Date: Fri Sep 16 10:35:42 2011
New Revision: 14659

URL: http://svn.gna.org/viewcvs/relax?rev=14659&view=rev
Log:
The relax data list delete button now opens with the first selected item in 
the list.


Modified:
    1.3/gui/components/relax_data.py

Modified: 1.3/gui/components/relax_data.py
URL: 
http://svn.gna.org/viewcvs/relax/1.3/gui/components/relax_data.py?rev=14659&r1=14658&r2=14659&view=diff
==============================================================================
--- 1.3/gui/components/relax_data.py (original)
+++ 1.3/gui/components/relax_data.py Fri Sep 16 10:35:42 2011
@@ -33,7 +33,7 @@
 
 # relax GUI module imports.
 from gui.fonts import font
-from gui.misc import add_border, float_to_gui, str_to_gui
+from gui.misc import add_border, float_to_gui, gui_to_str, str_to_gui
 from gui import paths
 from gui.user_functions import User_functions; user_functions = 
User_functions()
 
@@ -245,8 +245,20 @@
         @type event:    wx event
         """
 
+        # The current selection.
+        item = self.element.GetFirstSelected()
+
+        # No selection.
+        if item == -1:
+            id = None
+
+        # Selected item.
+        else:
+            # The spectrum ID.
+            id = gui_to_str(self.element.GetItemText(item))
+
         # Launch the dialog.
-        user_functions.relax_data.delete()
+        user_functions.relax_data.delete(ri_id=id)
 
 
     def relax_data_read(self, event):




Related Messages


Powered by MHonArc, Updated Fri Sep 16 10:40:02 2011