seantronsen / pvt

GNU General Public License v3.0
0 stars 0 forks source link

Negative start/end values for ParameterTrackbar don't seem to work with step #36

Closed ghoulapool closed 5 months ago

ghoulapool commented 5 months ago

Here's a track bar whose value should range from -1.3 --> -0.7 in increments of 0.01.

trackbar_w_0 = ParameterTrackbar("w_0", -1.3, -0.7, step=0.01, init=-1.0)

It gives this error:

AssertionError: error: step value exceeds range (step=0.01 > stop=-0.7)

Unless I'm wrong, I think this isn't correct that it should fail here.

seantrons commented 5 months ago

Should be resolved as of: 42373ae I changed the assertion check to use the range instead of the stopping value, which in hindsight should have been used in the first place.

Closing. If the issue pops back up don't hesitate to reopen.