chrisgoringe / cg-controller

MIT License
33 stars 3 forks source link

Can't move slider with scroll if step less than precision (was: Setting to require shift-scroll for sliders) #181

Closed chrisgoringe closed 3 weeks ago

chrisgoringe commented 3 weeks ago

By default the sliders respond to the scrollwheel.

This can be changed to make it so they require the shift key to be pressed.

LukeG89 commented 3 weeks ago

I think there is a problem with the cfg, I can change all the other sliders except for cfg ones...

https://github.com/user-attachments/assets/1e758142-b02f-4071-9c6c-9ffff0d5c514

JorgeR81 commented 3 weeks ago

I think there is a problem with the cfg, I can change all the other sliders except for cfg ones...

Shift-scroll working for me, in the cfg

Maybe this is caused by a custom node ?

The Shift key as another function on one of my custom nodes ( https://github.com/chrisgoringe/cg-controller/issues/188 )

LukeG89 commented 3 weeks ago

Maybe this is caused by a custom node ?

@JorgeR81 It can't be since the problem only occurs on CFG sliders.

The Shift key as another function on one of my custom nodes ( https://github.com/chrisgoringe/cg-controller/issues/188 )

This is a frontend function.

LukeG89 commented 3 weeks ago

It doesn't work even in always mode, so it's not due to shift key

LukeG89 commented 3 weeks ago

Could it be related to the default step size of 0.01?

step_size

(I tried scrolling as much as I can but it doesn't change a single value...)

chrisgoringe commented 3 weeks ago

I'll look at it. My guess is that there is a clash between step size and rounding (if it's rounded to 1 decimal place, but taking steps of 0.01).

chrisgoringe commented 3 weeks ago

Yup. There is a weird interplay between precision, round, and step. I think I've got it working...

JorgeR81 commented 3 weeks ago

Yup. There is a weird interplay between precision, round, and step. I think I've got it working...

After this fix, the other 2 issues I had are also fixed !

https://github.com/chrisgoringe/cg-controller/issues/61#issuecomment-2430375907 https://github.com/chrisgoringe/cg-controller/issues/61#issuecomment-2430408215

JorgeR81 commented 3 weeks ago

But now there are 2 different problems:

LukeG89 commented 3 weeks ago

Cfg now is working, but they are all 2 decimal digits instead of 1

JorgeR81 commented 3 weeks ago

This with the latest update:

chrisgoringe commented 3 weeks ago

Added 192

chrisgoringe commented 3 weeks ago

Resolved 192

JorgeR81 commented 3 weeks ago

Everything seems to work: