- changed status to resolved
Setting explicit color values results in wrong value being set
Issue #160
closed
I just tried setting the middle color arrow by double-clicking and entering a value of 0. The arrow position looked off to me, so I hovered over it and in the tooltip, it said that it's value was -0.111.
I'm attaching a screen recording.
Comments (3)
-
reporter -
reporter - removed milestone
Removing milestone: Alpha02 Release (automated comment)
-
reporter - changed status to closed
Merged to master.
- Log in to comment
Put in a temporary patch (with a TODO comment) to fix an issue with the color sliders not getting the value that was entered from a double-click. Turns out that updateThumbPos expects a value between 25-475, but the value sent in from the entry box was calculated between 0-450. The mouse drag of the sliders sends in adjusted values (25-475), so incrementing the value sent in in the function didn't work. I put a static addition of 25 in the call to the function because I didn't know how to access the min in the context from where the function was being called.
I also fixed some logic that was causing another bug I found during testing. If the user tried to set the max value using the number entry method, the slider would not change. The case was being missed because the check of the value used a '<' instead of a '<='. To be careful, I added a check on equality to the max because nextPos could actually be another slider.