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

Minor improvement for mod elements list D&D logic #4842

Merged
merged 5 commits into from
May 28, 2024

Conversation

Defeatomizer
Copy link
Collaborator

@Defeatomizer Defeatomizer commented May 19, 2024

With changes in this PR, when mouse is released, the listener sets the selection array to the list indices selected. This array is then checked when mouse dragging starts, and if it is non-null and the next click point is inside one of selected cells, the D&D action begins.

@Defeatomizer
Copy link
Collaborator Author

At this point it looks like some all prior assignments to that field will eventually be "overridden" (at the end of mouseDragged() and a couple in the middle of pressFiltered()), should those be removed?

@KlemenDEV
Copy link
Contributor

KlemenDEV commented May 19, 2024

If they are redundant and don't contribute anything outside making code hard to read, you can remove them, but make sure to do extensive testing (to prevent bugs like the one we are investigating right now with dynamic procedure dependencies from appearing)

@KlemenDEV KlemenDEV marked this pull request as draft May 20, 2024 06:53
@KlemenDEV
Copy link
Contributor

Marking as draft to make it more clear there are planned changes. Mark as RFR once you do them, thanks!

@Defeatomizer Defeatomizer marked this pull request as ready for review May 20, 2024 09:58
@KlemenDEV KlemenDEV added the community review Used by maintainers to mark issues that should get community reviews, tests, and feedback label May 20, 2024
Copy link
Contributor

@KlemenDEV KlemenDEV left a comment

Choose a reason for hiding this comment

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

LGTM. Clean and simple solution :)

@KlemenDEV KlemenDEV merged commit ffae7a4 into MCreator:master May 28, 2024
2 checks passed
@Defeatomizer Defeatomizer deleted the no-extra-click branch May 28, 2024 18:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
community review Used by maintainers to mark issues that should get community reviews, tests, and feedback
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants