OHIF-113: added element verification before tool activation.#116
Merged
swederik merged 2 commits intoOHIF:masterfrom Oct 13, 2017
andrebot:ohif-113/loading-tool-change
Merged
OHIF-113: added element verification before tool activation.#116swederik merged 2 commits intoOHIF:masterfrom andrebot:ohif-113/loading-tool-change
swederik merged 2 commits intoOHIF:masterfrom
andrebot:ohif-113/loading-tool-change
Conversation
gustavo82mdq
pushed a commit
to gtajesgenga/Viewers
that referenced
this pull request
Jan 18, 2018
* OHIF-113: added element verification before tool activation. * OHIF-113: fixing typo
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue
Switching tools while one of the viewports are loading throws an uncaught error. This is a bug in the toolManager, in which we need to add a better handler to this kind of situation.
Solution
Before doing any kind of activation through cornerstone I added a check for all elements we want to activate the tool. I added this snippet before all the logic because I wanted to avoid to do any kind of action if any of the elements was yet not enabled. This would prevent to execute any undo action and more complex logic to restore the last state.