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

Allow only changing element ownership in the same model #2519

Merged
merged 1 commit into from
Jul 22, 2023

Conversation

amolenaar
Copy link
Member

@amolenaar amolenaar commented Jul 19, 2023

PR Type

What kind of change does this PR introduce?

  • Bug fix
  • Feature
  • Chore (refactoring, formatting, local variables, other cleanup)
  • Documentation content changes

What is the current behavior?

Currently an exception is raised when you drag elements from one session and drop them in the model browser of another session

Issue Number: #2504

What is the new behavior?

This PR fixes the exception by explcitly checking if elements are part of the same model.

Does this PR introduce a breaking change?

  • Yes
  • No

Other information

To support DnD between models we need to use the internal copy functionality. But for that the copy functionality should be improved, as described in #2422.

So you cannot "change owner" for elements from one modeling session to another.
@github-actions github-actions bot added the python Pull requests that update Python code label Jul 19, 2023
@amolenaar amolenaar requested a review from danyeaw July 22, 2023 15:49
Copy link
Member

@danyeaw danyeaw left a comment

Choose a reason for hiding this comment

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

Looks good!

@danyeaw danyeaw added bug An issue in the application fix A fix for a bug and removed python Pull requests that update Python code bug An issue in the application labels Jul 22, 2023
@danyeaw danyeaw merged commit 8ff0af4 into main Jul 22, 2023
20 checks passed
@danyeaw danyeaw deleted the model-browser-dnd branch July 22, 2023 22:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fix A fix for a bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants