-
Notifications
You must be signed in to change notification settings - Fork 26
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
Disable brush in mags higher than mag8 #5017
Conversation
…/webknossos into disable-brush-in-high-mags
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.
Works like a charm, only two minor non-blocking suggestions :)
@@ -180,7 +183,7 @@ const getExplanationForDisabledVolume = ( | |||
return "Volume annotation is disabled while the merger mode is active."; | |||
} | |||
|
|||
if (!isLabelingPossible) { | |||
if (!isSegmentationVisibleForMag) { |
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.
One thing I noticed during testing is that this boolean is also false if the segmentation layer is simply disabled (for example, using 3
). Could you adapt the message accordingly?
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.
Good catch! Since the existing logic around the disabled tool tooltip (i.e., which text to show) was a bit convoluted, I refactored the corresponding code which made it easier to integrate the case you mentioned. Also, the automatic switching of the tool (if the current one gets disabled), got a bit DRYer due to the refactoring.
Feel free to have another look!
Co-authored-by: Daniel <[email protected]>
…able-brush-in-high-mags
URL of deployed dev instance (used for testing):
Steps to test:
Issues: