Author: bugman Date: Wed May 28 16:34:40 2014 New Revision: 23522 URL: http://svn.gna.org/viewcvs/relax?rev=23522&view=rev Log: Merged revisions 23495 via svnmerge from svn+ssh://bugman@xxxxxxxxxxx/svn/relax/trunk ........ r23495 | bugman | 2014-05-28 11:19:56 +0200 (Wed, 28 May 2014) | 7 lines Modification to the Sequence_2D GUI element used for some user function windows. The selection_win_show() method has been redefined, as the parent method from the Sequence element is specific for the 1D sequence module. The open_dialog() method has also been modified to use the new selection_win_show(), as well as the parent Sequence class selection_win_data() method. ........ Modified: branches/frame_order_cleanup/ (props changed) branches/frame_order_cleanup/gui/input_elements/sequence_2D.py Propchange: branches/frame_order_cleanup/ ------------------------------------------------------------------------------ --- svnmerge-integrated (original) +++ svnmerge-integrated Wed May 28 16:34:40 2014 @@ -1 +1 @@ -/trunk:1-23493 +/trunk:1-23493,23495 Modified: branches/frame_order_cleanup/gui/input_elements/sequence_2D.py URL: http://svn.gna.org/viewcvs/relax/branches/frame_order_cleanup/gui/input_elements/sequence_2D.py?rev=23522&r1=23521&r2=23522&view=diff ============================================================================== --- branches/frame_order_cleanup/gui/input_elements/sequence_2D.py (original) +++ branches/frame_order_cleanup/gui/input_elements/sequence_2D.py Wed May 28 16:34:40 2014 @@ -107,30 +107,29 @@ @type event: wx event """ - # Initialise the model selection window. - win = Sequence_window_2D(name=self.name, seq_type=self.seq_type, value_type=self.value_type, titles=self.titles, dim=self.dim) - - # Set the model selector window selections. - win.SetValue(self.GetValue()) - - # Show the model selector window. + # Show the window. + self.selection_win_show() + + # Extract the data from the selection window once closed. + self.selection_win_data() + + # Destroy the window. + del self.sel_win + + + def selection_win_show(self): + """Show the selection window.""" + + # Initialise the window. + self.sel_win = Sequence_window_2D(name=self.name, seq_type=self.seq_type, value_type=self.value_type, titles=self.titles, dim=self.dim) + + # Set the values. + self.sel_win.SetValue(self.GetValue()) + + # Show the window. if status.show_gui: - win.ShowModal() - win.Close() - - # Get the value. - value = win.GetValue() - - # No sequence data. - if not len(value): - self.Clear() - - # Set the values. - else: - self.SetValue(value) - - # Destroy the window. - del win + self.sel_win.ShowModal() + self.sel_win.Close()