Author: bugman Date: Mon Dec 13 11:43:23 2010 New Revision: 11771 URL: http://svn.gna.org/viewcvs/relax?rev=11771&view=rev Log: The molecule.add user function window also now uses the base class combo_box() method. Modified: branches/bieri_gui/gui_bieri/user_functions/molecule.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=11771&r1=11770&r2=11771&view=diff ============================================================================== --- branches/bieri_gui/gui_bieri/user_functions/molecule.py (original) +++ branches/bieri_gui/gui_bieri/user_functions/molecule.py Mon Dec 13 11:43:23 2010 @@ -89,17 +89,6 @@ _spacing = 20 - def _evt_mol_type(self, event): - """Selection of the molecule type. - - @param event: The wx event. - @type event: wx event - """ - - # Store the choice. - self.mol_type = str(event.GetString()) - - def add_uf(self, sizer): """Add the molecule specific GUI elements. @@ -117,7 +106,7 @@ sizer.AddSpacer(self._spacing) # The type selection. - self.chooser(sizer, "The type of molecule:", self._evt_mol_type, [''] + ALLOWED_MOL_TYPES) + self.mol_type = self.combo_box(sizer, "The type of molecule:", [''] + ALLOWED_MOL_TYPES) # Spacer. sizer.AddSpacer(self._spacing) @@ -128,9 +117,10 @@ # Get the name and type. mol_name = str(self.mol_name.GetValue()) + mol_type = str(self.mol_type.GetValue()) # Set the name. - self.interpreter.molecule.create(mol_name=mol_name, type=self.mol_type) + self.interpreter.molecule.create(mol_name=mol_name, type=mol_type)