[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [42348] trunk/blender/source/blender/ editors/gpencil/gpencil_buttons.c: Fix #28539: redraw issue with grease pencil active layer button, this was a regular

Brecht Van Lommel brechtvanlommel at pandora.be
Fri Dec 2 20:08:46 CET 2011


Revision: 42348
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=42348
Author:   blendix
Date:     2011-12-02 19:08:40 +0000 (Fri, 02 Dec 2011)
Log Message:
-----------
Fix #28539: redraw issue with grease pencil active layer button, this was a regular
button that acted like a toggle, now made it an actual toggle button.

Modified Paths:
--------------
    trunk/blender/source/blender/editors/gpencil/gpencil_buttons.c

Modified: trunk/blender/source/blender/editors/gpencil/gpencil_buttons.c
===================================================================
--- trunk/blender/source/blender/editors/gpencil/gpencil_buttons.c	2011-12-02 18:09:31 UTC (rev 42347)
+++ trunk/blender/source/blender/editors/gpencil/gpencil_buttons.c	2011-12-02 19:08:40 UTC (rev 42348)
@@ -125,7 +125,7 @@
 	/* 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 */




More information about the Bf-blender-cvs mailing list