-
Notifications
You must be signed in to change notification settings - Fork 11
Handle missing min/max gracefully for sliders/scrollbars #32
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
Comments
I did some digging. The reason it freezes is not because min and max are null—that would throw an NPE after all. It's because min defaults to A possible fix would be to change the code that creates the |
Thanks for digging, @ctrueden! |
I believe I have fixed the integer cases. Handling non-integers will be more involved, though. |
Currently, the UI hangs when trying to use a numeric parameter with
style=slider
, butmin
ormax
undefined:This should be handled gracefully, by checking for
softMin != null
andsoftMax != null
here:scijava-ui-swing/src/main/java/org/scijava/ui/swing/widget/SwingNumberWidget.java
Lines 102 to 124 in 221d3c6
If no slider or scroll bar can be rendered, we should fallback to the standard textfield/spinner combination and log a warning message.
The text was updated successfully, but these errors were encountered: