Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dockarea.restoreState corrupts dock state if a dock is present in dictionary but not in area #204

Open
sbourdeauducq opened this issue Aug 1, 2015 · 0 comments
Labels
Dock Issues/PRs related to the dock

Comments

@sbourdeauducq
Copy link

If a dictionary passed to restoreState references a dock name that has not been created by the application, pyqtgraph raises:
Exception: Cannot restore dock state; no dock with name "..."

So far so good, but in this case restoreState also leaves the dock state internally broken and the application unusable (if you simply catch the exception).

Much better behavior would be either:

  • not touch the dock state at all if the dictionary does not match it.
  • ignore those docks that are present in the dictionary and not in the area (or otherwise have inconsistent information in the dictionary).
  • mess up the dock layout but at least leave it possible for the user to rearrange it instead of internally corrupting it.
sbourdeauducq added a commit to m-labs/artiq that referenced this issue Aug 1, 2015
@j9ac9k j9ac9k added the Dock Issues/PRs related to the dock label Jun 7, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Dock Issues/PRs related to the dock
Projects
None yet
Development

No branches or pull requests

2 participants