fixed crash when dragging to change color in color picker

This commit is contained in:
toger5 2017-05-21 19:11:11 -07:00
parent 5b3709d309
commit 955615a3c3

View File

@ -361,7 +361,7 @@ void ColorPicker::_w_input(const Ref<InputEvent> &ev) {
if (!changing_color)
return;
float y = CLAMP((float)bev->get_pos().y, 0, 256);
float y = CLAMP((float)mev->get_pos().y, 0, 256);
h = 1.0 - y / 256.0;
color.set_hsv(h, s, v, color.a);
last_hsv = color;