bugfix [#24432] HS+V color picker
authorCampbell Barton <ideasman42@gmail.com>
Thu, 28 Oct 2010 12:01:02 +0000 (12:01 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Thu, 28 Oct 2010 12:01:02 +0000 (12:01 +0000)
source/blender/editors/interface/interface_handlers.c
source/blender/editors/interface/interface_widgets.c

index 70091a712c624fcea8b600434097d712a3447f07..d3f915cddcebfd137113656207d6bb924874d47c 100644 (file)
@@ -3006,13 +3006,13 @@ static int ui_numedit_but_HSVCUBE(uiBut *but, uiHandleButtonData *data, int mx,
                hsv[0]= x;
                hsv[1]= y;
                break;
-       case UI_GRAD_SV + 3:
+       case UI_GRAD_H:
                hsv[0]= x;
                break;
-       case UI_GRAD_HV + 3:
+       case UI_GRAD_S:
                hsv[1]= x;
                break;
-       case UI_GRAD_HS + 3:
+       case UI_GRAD_V:
                hsv[2]= x;
                break;
        case UI_GRAD_V_ALT:     
index 644bb50fca4c450454a2bad498d291cbc42e5be8..2a6ab525f89557846d71469d7c7b704c55d38ad0 100644 (file)
@@ -1729,7 +1729,7 @@ void ui_draw_but_HSVCIRCLE(uiBut *but, uiWidgetColors *wcol, rcti *rect)
 void ui_draw_gradient(rcti *rect, float *hsv, int type, float alpha)
 {
        int a;
-       float h= hsv[0], s= hsv[1], v= hsv[0];
+       float h= hsv[0], s= hsv[1], v= hsv[2];
        float dx, dy, sx1, sx2, sy;
        float col0[4][3];       // left half, rect bottom to top
        float col1[4][3];       // right half, rect bottom to top