-
Notifications
You must be signed in to change notification settings - Fork 38
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
Set InteractCheckableTool._roi
to None
on deactivate
#420
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #420 +/- ##
=======================================
Coverage 86.63% 86.64%
=======================================
Files 89 89
Lines 5163 5165 +2
=======================================
+ Hits 4473 4475 +2
Misses 690 690 ☔ View full report in Codecov by Sentry. |
Is this trying to solve the same problem that I approached differently in #416 ? Or is this for something else? |
This is trying to solve the problem I was hacking around in spacetelescope/jdaviz#2639. |
@dhomeier This looks good to go in to me, I confirmed on the Jdaviz side that it fixes the unwanted behavior. |
tl;dr -- This does not reintroduce the problem where the angle resets when you click and drag a rotated shape, does it? |
The existing problem of the gray preview not matching the rotation of the actual subset persists, but it's not worse than the current state. The dragged subset retains its angle in my testing. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, thanks!
Description
Reset any
_roi
in anInteractCheckableTool
when callingdeactivate
.This is to avoid inheriting changed attributes like rotation angle from previously created selections. It will not reset the attributes when creating new ROIs with the same (left open) tool instance.