Fixing ZeroDivisionError thrown by UI sliders when the value_range is zero (0)#645
Conversation
Codecov Report
@@ Coverage Diff @@
## master #645 +/- ##
==========================================
- Coverage 52.04% 51.02% -1.03%
==========================================
Files 108 108
Lines 23812 23894 +82
Branches 2631 2631
==========================================
- Hits 12394 12192 -202
- Misses 11013 11293 +280
- Partials 405 409 +4
|
|
Hello @ganimtron-10, |
There was a problem hiding this comment.
Hi @ganimtron-10, I tried this with this animation example and the Fox model. It was causing ZeroDivisionError previously. It's working fine now 👍🏽.
I still need to check this with different models, I'll let you know if I find anything.
skoudoro
left a comment
There was a problem hiding this comment.
hi @ganimtron-10,
The fix looks good to me. however, the tests are weird.... Can you update your tests? thanks
|
Hi @ganimtron-10 , |
|
Thank You @m-agour for the suggestion. |
skoudoro
left a comment
There was a problem hiding this comment.
LGTM, thanks @ganimtron-10 and @m-agour ! merging
Currently, the UI sliders throw
ZeroDivisionErrorwhenever thevalue_rangeis zero ie. min_value and max_value are the same.Adding checks to avoid these errors and setting the handle at the start.