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: imageIdSpecificStateManager.js #1173

Closed
jlopes90 opened this issue Jan 30, 2020 · 7 comments
Closed

Fix: imageIdSpecificStateManager.js #1173

jlopes90 opened this issue Jan 30, 2020 · 7 comments
Labels
Bug: Verified 🐛 Bug reported, reproducible, and verified.

Comments

@jlopes90
Copy link
Contributor

jlopes90 commented Jan 30, 2020

#1151

@dannyrb
Copy link
Member

dannyrb commented Jan 30, 2020

I'm sorry. What's the issue?

@jlopes90
Copy link
Contributor Author

// Clears all tool data from this toolStateManager.
function clearElementToolState(element) {
const enabledElement = external.cornerstone.getEnabledElement(element);
if (!enabledElement.image) {
return;
}
clearImageIdToolState(enabledElement.imageId);
}

I think there was an error, missing the "image" object

clearImageIdToolState(enabledElement.imageId);

to change:

clearImageIdToolState(enabledElement.image.imageId);

@jlopes90
Copy link
Contributor Author

jlopes90 commented Jan 30, 2020

I updated the recent version and noticed that it was not working erasing annotations, I looked for this problem.

@dannyrb
Copy link
Member

dannyrb commented Jan 30, 2020

I think you're right. Are you able to draft a PR? When you apply the changes, does it work as you would expect?

@dannyrb dannyrb added the Bug: Verified 🐛 Bug reported, reproducible, and verified. label Jan 30, 2020
@dannyrb
Copy link
Member

dannyrb commented Jan 30, 2020

@jlopes90, merged. Please let me know if this resolved your issue and we can close.

@mikehazell
Copy link
Contributor

Arrgh.. my bad. Thank you for finding / fixing this @jlopes90

@dannyrb
Copy link
Member

dannyrb commented Jan 30, 2020

@mikehazell it's no one's bad when we don't have unit tests :p

Thank you both for your contributions!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug: Verified 🐛 Bug reported, reproducible, and verified.
Projects
None yet
Development

No branches or pull requests

3 participants