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

Fix polygon tool bug #799

Merged
merged 3 commits into from
Mar 12, 2024
Merged

Fix polygon tool bug #799

merged 3 commits into from
Mar 12, 2024

Conversation

lehecht
Copy link
Contributor

@lehecht lehecht commented Mar 5, 2024

When interaction mode is changed, the old and new computed property change, which triggers their corresponding watchers.
Fix bug by using watcher of current interaction mode only.

When interaction mode is changed,
the old and new computed property change,
which triggers their corresponding watchers.
Fix bug by using watcher of current interaction mode only.

Fixes #798
@lehecht lehecht linked an issue Mar 5, 2024 that may be closed by this pull request
@mzur mzur self-requested a review March 5, 2024 13:39
Copy link
Member

@mzur mzur left a comment

Choose a reason for hiding this comment

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

If I just disable one of the tools, the interaction is not reset (i.e. the tool remains active). To reproduce, activate the polygon brush and then press Esc. The brush is still active.

@lehecht lehecht requested a review from mzur March 7, 2024 07:00
Copy link
Member

@mzur mzur left a comment

Choose a reason for hiding this comment

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

This still doesn't work in all cases, unfortunately. When I now switch from the polygon brush to the magic wand tool (or any other tool), both will be active. You can tinker a little with all the tools before you submit a new version for review, then you will quickly see issues like these yourself.

The video annotation tool does this a little differently, as it has a variable for each interaction that can be added/removed separately. There, everything works correctly.

@lehecht
Copy link
Contributor Author

lehecht commented Mar 12, 2024

I tested the code multiple times for images and videos now. I think there shouldn't be bugs any more. Sorry for my hasty approach before!

@lehecht lehecht requested a review from mzur March 12, 2024 06:48
Copy link
Member

@mzur mzur left a comment

Choose a reason for hiding this comment

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

Works, thanks!

@mzur mzur merged commit c6807fc into master Mar 12, 2024
6 checks passed
@mzur mzur deleted the polygon-tool-bug branch March 12, 2024 08:01
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.

Switching between advanced polygon tools sometimes does not work
2 participants