enthought / enthought/mayavi

Editor window doesn't remember size under Qt

Open
#809 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
1.4k
Forks
316
Avg merge
7h 44m
Merged PRs (30d)
5

Description

To replicate (via Prabhu):
```
mayavi2 -d ParametricSurface -m Surface
```
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.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.