"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "gui/analyses/__init__.py" between
relax-4.1.3.src.tar.bz2 and relax-5.0.0.src.tar.bz2

About: relax allows the study of molecular dynamics through the analysis of experimental NMR data. Organic molecules, proteins, RNA, DNA, sugars, and other biomolecules are all supported.

__init__.py  (relax-4.1.3.src.tar.bz2):__init__.py  (relax-5.0.0.src.tar.bz2)
skipping to change at line 219 skipping to change at line 219
mod_name = inspect.getmodule(inspect.stack()[1][0]).__name__ mod_name = inspect.getmodule(inspect.stack()[1][0]).__name__
class_name = self.__class__.__name__ class_name = self.__class__.__name__
full_name = "%s.%s.%s" % (mod_name, class_name, fn_name) full_name = "%s.%s.%s" % (mod_name, class_name, fn_name)
print("\n\n") print("\n\n")
print("debug> %s: Deleting the analysis at index %s." % (full_name, index)) print("debug> %s: Deleting the analysis at index %s." % (full_name, index))
# Decrement the number of analyses. # Decrement the number of analyses.
self._num_analyses -= 1 self._num_analyses -= 1
# Shift the current page back one if necessary. # Shift the current page back one if necessary.
if self._current > index: if self._current != None and self._current > index:
self._current -= 1 self._current -= 1
if status.debug: if status.debug:
print("debug> %s: Switching the current analysis to index %s." % (full_name, self._current)) print("debug> %s: Switching the current analysis to index %s." % (full_name, self._current))
# Execute the analysis delete method, if it exists. # Execute the analysis delete method, if it exists.
if hasattr(self._analyses[index], 'delete'): if hasattr(self._analyses[index], 'delete'):
if status.debug: if status.debug:
print("debug> %s: Executing the analysis specific delete() meth od." % full_name) print("debug> %s: Executing the analysis specific delete() meth od." % full_name)
self._analyses[index].delete() self._analyses[index].delete()
wx.Yield() wx.Yield()
skipping to change at line 486 skipping to change at line 486
# Create a notebook and add it to the sizer. # Create a notebook and add it to the sizer.
self.notebook = wx.Notebook(self.gui, -1, style=wx.NB_TOP) self.notebook = wx.Notebook(self.gui, -1, style=wx.NB_TOP)
sizer.Add(self.notebook, 1, wx.ALL|wx.EXPAND, 0) sizer.Add(self.notebook, 1, wx.ALL|wx.EXPAND, 0)
# Bind changing events. # Bind changing events.
self.gui.Bind(wx.EVT_NOTEBOOK_PAGE_CHANGING, self.on_page_changing) self.gui.Bind(wx.EVT_NOTEBOOK_PAGE_CHANGING, self.on_page_changing)
self.gui.Bind(wx.EVT_NOTEBOOK_PAGE_CHANGED, self.on_page_changed) self.gui.Bind(wx.EVT_NOTEBOOK_PAGE_CHANGED, self.on_page_changed)
# Delete the previous sizer. # Delete the previous sizer.
old_sizer = self.gui.GetSizer() old_sizer = self.gui.GetSizer()
old_sizer.DeleteWindows() old_sizer.Clear(True)
# Add the new sizer to the main window. # Add the new sizer to the main window.
self.gui.SetSizer(sizer) self.gui.SetSizer(sizer)
sizer.Layout() sizer.Layout()
# The analysis classes. # The analysis classes.
classes = { classes = {
'noe': Auto_noe, 'noe': Auto_noe,
'r1': Auto_r1, 'r1': Auto_r1,
'r2': Auto_r2, 'r2': Auto_r2,
skipping to change at line 685 skipping to change at line 685
def set_init_state(self): def set_init_state(self):
"""Revert to the initial state.""" """Revert to the initial state."""
# Reset the flag. # Reset the flag.
self.init_state = True self.init_state = True
self._current = None self._current = None
# Delete the previous sizer. # Delete the previous sizer.
old_sizer = self.gui.GetSizer() old_sizer = self.gui.GetSizer()
old_sizer.DeleteWindows() old_sizer.Clear(True)
# Delete the notebook. # Delete the notebook.
if hasattr(self, 'notebook'): if hasattr(self, 'notebook'):
del self.notebook del self.notebook
# Recreate the GUI data store object (needed if the reset user function is called). # Recreate the GUI data store object (needed if the reset user function is called).
if not hasattr(ds, 'relax_gui'): if not hasattr(ds, 'relax_gui'):
ds.relax_gui = Gui() ds.relax_gui = Gui()
# Recreate the start screen. # Recreate the start screen.
 End of changes. 3 change blocks. 
3 lines changed or deleted 3 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)