Author: bugman Date: Thu Dec 30 18:13:56 2010 New Revision: 12046 URL: http://svn.gna.org/viewcvs/relax?rev=12046&view=rev Log: Fix for the delete menu entries in the spin view window, the user function windows were blank! The switch from a wx.Frame to a wx.Dialog broke the code as ShowModal() was freezing the application. Modified: branches/bieri_gui/gui_bieri/user_functions/molecule.py branches/bieri_gui/gui_bieri/user_functions/residue.py branches/bieri_gui/gui_bieri/user_functions/spin.py Modified: branches/bieri_gui/gui_bieri/user_functions/molecule.py URL: http://svn.gna.org/viewcvs/relax/branches/bieri_gui/gui_bieri/user_functions/molecule.py?rev=12046&r1=12045&r2=12046&view=diff ============================================================================== --- branches/bieri_gui/gui_bieri/user_functions/molecule.py (original) +++ branches/bieri_gui/gui_bieri/user_functions/molecule.py Thu Dec 30 18:13:56 2010 @@ -68,12 +68,12 @@ # Initialise the dialog. self._delete_window = Delete_window(self.gui, self.interpreter) - # Show the dialog. - self._delete_window.ShowModal() - # Default molecule name. if mol_name: self._delete_window.mol.SetValue(mol_name) + + # Show the dialog. + self._delete_window.ShowModal() # Destroy. self._delete_window.Destroy() @@ -167,9 +167,6 @@ # Clear the previous data. self.mol.Clear() - # Clear the molecule name. - self.mol.SetValue('') - # The list of molecule names. if pipes.cdp_name(): for mol in molecule_loop(): Modified: branches/bieri_gui/gui_bieri/user_functions/residue.py URL: http://svn.gna.org/viewcvs/relax/branches/bieri_gui/gui_bieri/user_functions/residue.py?rev=12046&r1=12045&r2=12046&view=diff ============================================================================== --- branches/bieri_gui/gui_bieri/user_functions/residue.py (original) +++ branches/bieri_gui/gui_bieri/user_functions/residue.py Thu Dec 30 18:13:56 2010 @@ -53,12 +53,12 @@ # Initialise the dialog. self._create_window = Create_window(self.gui, self.interpreter) - # Show the dialog. - self._create_window.ShowModal() - # Default molecule name. if mol_name: self._create_window.mol.SetValue(mol_name) + + # Show the dialog. + self._create_window.ShowModal() # Destroy. self._create_window.Destroy() @@ -80,9 +80,6 @@ # Initialise the dialog. self._delete_window = Delete_window(self.gui, self.interpreter) - # Show the dialog. - self._delete_window.ShowModal() - # Default molecule name. if mol_name: self._delete_window.mol.SetValue(mol_name) @@ -90,6 +87,9 @@ # Default residue. if res_num or res_name: self._delete_window.res.SetValue("%s %s" % (res_num, res_name)) + + # Show the dialog. + self._delete_window.ShowModal() # Destroy. self._delete_window.Destroy() @@ -159,9 +159,6 @@ # Clear the previous data. self.mol.Clear() - # Clear the text. - self.mol.SetValue('') - # The list of molecule names. if pipes.cdp_name(): for mol in molecule_loop(): @@ -220,10 +217,6 @@ self.mol.Clear() self.res.Clear() - # Clear the text. - self.mol.SetValue('') - self.res.SetValue('') - # The list of molecule names. if pipes.cdp_name(): for mol in molecule_loop(): Modified: branches/bieri_gui/gui_bieri/user_functions/spin.py URL: http://svn.gna.org/viewcvs/relax/branches/bieri_gui/gui_bieri/user_functions/spin.py?rev=12046&r1=12045&r2=12046&view=diff ============================================================================== --- branches/bieri_gui/gui_bieri/user_functions/spin.py (original) +++ branches/bieri_gui/gui_bieri/user_functions/spin.py Thu Dec 30 18:13:56 2010 @@ -57,9 +57,6 @@ # Initialise the dialog. self._create_window = Create_window(self.gui, self.interpreter) - # Show the dialog. - self._create_window.ShowModal() - # Default molecule name. if mol_name: self._create_window.mol.SetValue(mol_name) @@ -67,6 +64,9 @@ # Default residue. if res_num or res_name: self._create_window.res.SetValue("%s %s" % (res_num, res_name)) + + # Show the dialog. + self._create_window.ShowModal() # Destroy. self._create_window.Destroy() @@ -92,9 +92,6 @@ # Initialise the dialog. self._delete_window = Delete_window(self.gui, self.interpreter) - # Show the dialog. - self._delete_window.ShowModal() - # Default molecule name. if mol_name: self._delete_window.mol.SetValue(mol_name) @@ -106,6 +103,9 @@ # Default spin. if spin_num or spin_name: self._delete_window.spin.SetValue("%s %s" % (spin_num, spin_name)) + + # Show the dialog. + self._delete_window.ShowModal() # Destroy. self._delete_window.Destroy() @@ -179,10 +179,6 @@ self.mol.Clear() self.res.Clear() - # Clear the text. - self.mol.SetValue('') - self.res.SetValue('') - # The list of molecule names. if pipes.cdp_name(): for mol in molecule_loop(): @@ -244,11 +240,6 @@ self.res.Clear() self.spin.Clear() - # Clear the text. - self.mol.SetValue('') - self.res.SetValue('') - self.spin.SetValue('') - # The list of molecule names. if pipes.cdp_name(): for mol in molecule_loop():