Fix own bug reported on irc by Venomgfx, missing value slider in color
authorAntony Riakiotakis <kalast@gmail.com>
Mon, 17 Mar 2014 18:01:33 +0000 (20:01 +0200)
committerAntony Riakiotakis <kalast@gmail.com>
Mon, 17 Mar 2014 18:01:33 +0000 (20:01 +0200)
pickers.

source/blender/editors/interface/interface_regions.c

index 7dce3397b7772d8078cef5731ced06dd746d6458..cd483adac5337d455c2dfcb464d69968ff4179c6 100644 (file)
@@ -1954,10 +1954,10 @@ static void uiBlockPicker(uiBlock *block, float rgba[4], PointerRNA *ptr, Proper
        uiButSetFunc(bt, do_color_wheel_rna_cb, bt, hsv);
        bt = uiDefButF(block, NUMSLI, 0, IFACE_("S:"),   0, yco -= UI_UNIT_Y, butwidth, UI_UNIT_Y, hsv + 1, 0.0, 1.0, 10, 3, TIP_("Saturation"));
        uiButSetFunc(bt, do_color_wheel_rna_cb, bt, hsv);
-       if (U.color_picker_type == USER_CP_CIRCLE_HSV)
-               bt = uiDefButF(block, NUMSLI, 0, IFACE_("V:"),   0, yco -= UI_UNIT_Y, butwidth, UI_UNIT_Y, hsv + 2, 0.0, softmax, 10, 3, TIP_("Value"));
-       else if (U.color_picker_type == USER_CP_CIRCLE_HSL)
+       if (U.color_picker_type == USER_CP_CIRCLE_HSL)
                bt = uiDefButF(block, NUMSLI, 0, IFACE_("L:"),   0, yco -= UI_UNIT_Y, butwidth, UI_UNIT_Y, hsv + 2, 0.0, softmax, 10, 3, TIP_("Lightness"));
+       else
+               bt = uiDefButF(block, NUMSLI, 0, IFACE_("V:"),   0, yco -= UI_UNIT_Y, butwidth, UI_UNIT_Y, hsv + 2, 0.0, softmax, 10, 3, TIP_("Value"));
 
        bt->hardmax = hardmax;  /* not common but rgb  may be over 1.0 */
        uiButSetFunc(bt, do_color_wheel_rna_cb, bt, hsv);