Merging r47674 through r47676 from trunk into soc-2011-tomato
[blender.git] / source / blender / editors / interface / interface_draw.c
index ad2dca5cec4e35d64db3dde129d554dc11cca5a7..f368e7cf4c7f509f1681af4babb674a3aba3b905 100644 (file)
@@ -754,8 +754,12 @@ void ui_draw_but_HISTOGRAM(ARegion *ar, uiBut *but, uiWidgetColors *UNUSED(wcol)
                fdrawline(rect.xmin + (i / 4.f) * w, rect.ymin, rect.xmin + (i / 4.f) * w, rect.ymax);
        }
        
-       if (hist->mode == HISTO_MODE_LUMA)
+       if (hist->mode == HISTO_MODE_LUMA) {
                histogram_draw_one(1.0, 1.0, 1.0, 0.75, rect.xmin, rect.ymin, w, h, hist->data_luma, res, is_line);
+       }
+       else if (hist->mode == HISTO_MODE_ALPHA) {
+               histogram_draw_one(1.0, 1.0, 1.0, 0.75, rect.xmin, rect.ymin, w, h, hist->data_a, res, is_line);
+       }
        else {
                if (hist->mode == HISTO_MODE_RGB || hist->mode == HISTO_MODE_R)
                        histogram_draw_one(1.0, 0.0, 0.0, 0.75, rect.xmin, rect.ymin, w, h, hist->data_r, res, is_line);