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

Fixes for NewAction in the TreeEditor to remove shared state #1953

Merged
merged 3 commits into from
Nov 4, 2022

Conversation

corranwebster
Copy link
Contributor

@corranwebster corranwebster commented Nov 4, 2022

Fixes #1948

Unfortunately I'm unsure how to create a regression test for this right now; the underlying code is not factored particularly well, so I'll open a ticket for that: #1954

Checklist

  • Add a news fragment if this PR is news-worthy for end users. (see docs/releases/README.rst)

@corranwebster corranwebster mentioned this pull request Nov 4, 2022
1 task
Copy link
Contributor

@aaronayres35 aaronayres35 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tested the example given on the original issue and was able to reproduce the error on my machine on main / confirm that it no longer occurs on this branch.

I also tested to ensure the behavior remains unchanged when not reusing the same tree editor (ie by doing what you described here #1948 (comment)).

group.id = ""
# Reset the group for the current usage in case it is shared
# - the call to `node.get_add()` is potentially dynamic
group.clear()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

does the second half of the comment added for wx also apply here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Argh - I updated the Qt version but forgot to save and push.

@corranwebster corranwebster merged commit eaaa696 into main Nov 4, 2022
@corranwebster corranwebster deleted the fix/tree-editor-new-menu branch November 4, 2022 14:00
corranwebster added a commit that referenced this pull request Nov 4, 2022
* Fixes for NewAction in the TreeEditor to remove shared state

* Add changelog entry.

* Update comment.
corranwebster added a commit that referenced this pull request Nov 4, 2022
* Fixes for NewAction in the TreeEditor to remove shared state

* Add changelog entry.

* Update comment.
corranwebster added a commit that referenced this pull request Nov 4, 2022
* Fixes for NewAction in the TreeEditor to remove shared state

* Add changelog entry.

* Update comment.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

The program crashed when reusing TreeEditor with NewAction
2 participants