Author: bugman Date: Wed Sep 19 09:43:30 2012 New Revision: 17496 URL: http://svn.gna.org/viewcvs/relax?rev=17496&view=rev Log: Fix for bug #20182 (https://gna.org/bugs/?20182) - the sequence element window ordering issue. The sequence element window now has the parent wx.Window element set. This prevents the main relax window from being set as the parent and hence coming to the front after the sequence element window is launched from a user function window. Modified: trunk/gui/input_elements/sequence.py Modified: trunk/gui/input_elements/sequence.py URL: http://svn.gna.org/viewcvs/relax/trunk/gui/input_elements/sequence.py?rev=17496&r1=17495&r2=17496&view=diff ============================================================================== --- trunk/gui/input_elements/sequence.py (original) +++ trunk/gui/input_elements/sequence.py Wed Sep 19 09:43:30 2012 @@ -101,6 +101,7 @@ """ # Store the args. + self.parent = parent self.name = name self.default = default self.element_type = element_type @@ -337,7 +338,7 @@ """ # Initialise the model selection window. - win = Sequence_window(name=self.name, seq_type=self.seq_type, value_type=self.value_type, dim=self.dim) + win = Sequence_window(parent=self.parent, name=self.name, seq_type=self.seq_type, value_type=self.value_type, dim=self.dim) # Set the model selector window selections. win.SetValue(self.GetValue()) @@ -392,9 +393,11 @@ # Sizes. SIZE_BUTTON = (150, 33) - def __init__(self, name='', seq_type='list', value_type='str', dim=None): + def __init__(self, parent=None, name='', seq_type='list', value_type='str', dim=None): """Set up the string list editor window. + @keyword parent: The parent GUI element. + @type parent: wx.Window instance or None @keyword name: The name of the window. @type name: str @keyword seq_type: The type of Python sequence. This should be one of 'list' or 'tuple'. @@ -428,7 +431,7 @@ title = "Edit the %s values." % name # Set up the dialog. - wx.Dialog.__init__(self, None, id=-1, title=title) + wx.Dialog.__init__(self, parent, id=-1, title=title) # Initialise some values self.width = self.SIZE[0] - 2*self.BORDER