then in the view make sure that the pipeline view, object editor and python shell are turned on. then adjust the view and close the app. if you re-launch with
$ mayavi2 -d ParametricSurface -m Surface
you should see the issue with the app not retaining the size for the VTK view.
With a bit of digging, I think at least part of the problem is that the default EditorManager (and the default Envisage WorkbenchEditorManager) do not implement the get_editor_memento and set_editor_memento methods. This means that although the geometry of the editor area is serialized, when loading there is no way of restoring the individual editor tabs and so an empty editor area is created (see https://github.com/enthought/pyface/blob/e047d8b882f2d2f52b4a4a8e7c6af86be2489143/pyface/ui/qt4/workbench/split_tab_widget.py#L110 for the restoration code).
There may be more going on - for example something should be storing the geometry of the central widget of the MainWindow and if this is not done by the saveState/restoreState of the QMainWindow then this is something that Pyface would need to track separately.
And it is also not clear if this is a Pyface issue for not doing something sensible if it can't restore tabs, or a Mayavi issue.
In any case, the correct fix is probably to migrate Mayavi to Tasks.
To replicate (via Prabhu):
then in the view make sure that the pipeline view, object editor and python shell are turned on. then adjust the view and close the app. if you re-launch with
you should see the issue with the app not retaining the size for the VTK view.
With a bit of digging, I think at least part of the problem is that the default
EditorManager
(and the default EnvisageWorkbenchEditorManager
) do not implement theget_editor_memento
andset_editor_memento
methods. This means that although the geometry of the editor area is serialized, when loading there is no way of restoring the individual editor tabs and so an empty editor area is created (see https://github.com/enthought/pyface/blob/e047d8b882f2d2f52b4a4a8e7c6af86be2489143/pyface/ui/qt4/workbench/split_tab_widget.py#L110 for the restoration code).There may be more going on - for example something should be storing the geometry of the central widget of the MainWindow and if this is not done by the
saveState
/restoreState
of theQMainWindow
then this is something that Pyface would need to track separately.And it is also not clear if this is a Pyface issue for not doing something sensible if it can't restore tabs, or a Mayavi issue.
In any case, the correct fix is probably to migrate Mayavi to Tasks.