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

Remember position of Python editor windows & fix crash when deleting a Python node with an open editor #8295

Merged
merged 7 commits into from
Jan 9, 2018

Conversation

Dewb
Copy link
Contributor

@Dewb Dewb commented Oct 30, 2017

Purpose

Python editor windows that are moved or resized from the initial location will remember their new size/position for the duration of the Dynamo session. This size information will not be persisted to the workspace, so closing and reopening the workspace, or Dynamo, will reset the window locations back to their default position.

If an editor window is on a secondary display when it is closed, and the secondary display is disconnected, the editor window will be restored to the default position if it is opened.

This also fixes a crash issue when the user deletes a Python node while the editor window is still open. The user will be shown a warning dialog giving them the opportunity to cancel the deletion, or hit OK to close the window and delete the node. (QNTM-2533).

image

Declarations

Check these if you believe they are true

  • The code base is in a better state after this PR
  • Is documented according to the standards
  • The level of testing this PR includes is appropriate
  • User facing strings, if any, are extracted into *.resx files
  • All tests pass using the self-service CI.
  • Snapshot of UI changes, if any.
  • Changes to the API follow Semantic Versioning, and are documented in the API Changes document.

Reviewers

@aparajit-pratap

FYIs

@Racel

@Dewb Dewb changed the title Remember position of Python editor windows during a session Remember position of Python editor windows & fix crash when deleting a Python node with an open editor Nov 1, 2017
@Racel
Copy link
Contributor

Racel commented Nov 2, 2017

Thanks for doing this @Dewb. Just linked it to the OP about resizing Python windows. When this is merged, we should close that issue.

Also, would you mind adding images of the UI changes to the description? We typically do this for all UI changes per the declaration checklist.

@aparajit-pratap
Copy link
Contributor

@Dewb LGTM!

@Dewb
Copy link
Contributor Author

Dewb commented Nov 15, 2017

@Racel image added!

@mjkkirschner
Copy link
Member

Hey @Dewb I'm just curious what happens when you close a python node on an external monitor, and then later reopen it when the monitor doesn't exist?

@Dewb
Copy link
Contributor Author

Dewb commented Dec 1, 2017

@mjkkirschner I finally got some "free time" (ha!) today to investigate your very good question, and as I expected, the window is restored offscreen in that situation. Just pushed a fix. It's been tested on my 3-display desktop, but it could use some additional testing on a high-DPI display. (Updated the description with this feature.)

@mjkkirschner
Copy link
Member

@Dewb I will try to test this this weekend.

@Racel
Copy link
Contributor

Racel commented Jan 2, 2018

@mjkkirschner - is this good to merge?

@mjkkirschner
Copy link
Member

@Racel LGTM

@Dewb Dewb merged commit 829eb32 into master Jan 9, 2018
@QilongTang QilongTang deleted the python_window_persistence branch January 23, 2018 15:33
@horatiubota horatiubota added the error/warning/crash Issues mentioning a Dynamo error, warning or crash message label Nov 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
error/warning/crash Issues mentioning a Dynamo error, warning or crash message
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants