Fix #28539: redraw issue with grease pencil active layer button, this was a regular
authorBrecht Van Lommel <brechtvanlommel@pandora.be>
Fri, 2 Dec 2011 19:08:40 +0000 (19:08 +0000)
committerBrecht Van Lommel <brechtvanlommel@pandora.be>
Fri, 2 Dec 2011 19:08:40 +0000 (19:08 +0000)
button that acted like a toggle, now made it an actual toggle button.

source/blender/editors/gpencil/gpencil_buttons.c

index 57dd1ef55725913905b6edecd0650fd81a35d0b9..760faf01b6c8abc450d78eabe2aeaa8792c16386 100644 (file)
@@ -125,7 +125,7 @@ static void gp_drawui_layer (uiLayout *layout, bGPdata *gpd, bGPDlayer *gpl, con
        /* active */
        block= uiLayoutGetBlock(sub);
        icon= (gpl->flag & GP_LAYER_ACTIVE) ? ICON_RADIOBUT_ON : ICON_RADIOBUT_OFF;
-       but= uiDefIconBut(block, BUT, 0, icon, 0, 0, UI_UNIT_X, UI_UNIT_Y, NULL, 0.0, 0.0, 0.0, 0.0, "Set active layer");
+       but= uiDefIconButBitI(block, TOG, GP_LAYER_ACTIVE, 0, icon, 0, 0, UI_UNIT_X, UI_UNIT_Y, &gpd->flag, 0.0, 0.0, 0.0, 0.0, "Set active layer");
        uiButSetFunc(but, gp_ui_activelayer_cb, gpd, gpl);
 
        /* locked */