diff --git a/traitsui/editors/array_editor.py b/traitsui/editors/array_editor.py index e1f12a854..bb9f6235d 100644 --- a/traitsui/editors/array_editor.py +++ b/traitsui/editors/array_editor.py @@ -55,8 +55,7 @@ class ArrayStructure(HasTraits): def __init__(self, editor): """ Initializes the object. """ - # Save the reference to the editor: - self.editor = editor + super().__init__(editor=editor) # Set up the field width for each item: width = editor.factory.width diff --git a/traitsui/editors/tuple_editor.py b/traitsui/editors/tuple_editor.py index 862ce95ac..a07d2d86a 100644 --- a/traitsui/editors/tuple_editor.py +++ b/traitsui/editors/tuple_editor.py @@ -113,15 +113,14 @@ class TupleStructure(HasTraits): def __init__(self, editor): """ Initializes the object. """ + super().__init__(editor=editor) + factory = editor.factory types = factory.types labels = factory.labels editors = factory.editors cols = factory.cols - # Save the reference to the editor: - self.editor = editor - # Get the tuple we are mirroring: object = editor.value diff --git a/traitsui/qt4/ui_panel.py b/traitsui/qt4/ui_panel.py index f49203979..011f05ab2 100644 --- a/traitsui/qt4/ui_panel.py +++ b/traitsui/qt4/ui_panel.py @@ -102,7 +102,8 @@ class _Panel(BasePanel): def __init__(self, ui, parent, is_subpanel): """Initialise the object. """ - self.ui = ui + super().__init__(ui=ui) + history = ui.history view = ui.view