[Bf-blender-cvs] [6b53fc7b791] greasepencil-object: Fix color picker panel position

Antonio Vazquez noreply at git.blender.org
Thu May 31 17:03:38 CEST 2018


Commit: 6b53fc7b791b357f9291bd432ee3a61fd62290d5
Author: Antonio Vazquez
Date:   Thu May 31 17:03:30 2018 +0200
Branches: greasepencil-object
https://developer.blender.org/rB6b53fc7b791b357f9291bd432ee3a61fd62290d5

Fix color picker panel position

This is ahack to avoid the panel is shifted to the right. It looks the function to calculate the visible rect is using the toolbar size, but the view is full width.

===================================================================

M	source/blender/editors/gpencil/gpencil_colorpick.c

===================================================================

diff --git a/source/blender/editors/gpencil/gpencil_colorpick.c b/source/blender/editors/gpencil/gpencil_colorpick.c
index 1ba8a0806a7..27f24d841cd 100644
--- a/source/blender/editors/gpencil/gpencil_colorpick.c
+++ b/source/blender/editors/gpencil/gpencil_colorpick.c
@@ -317,6 +317,10 @@ static tGPDpick *gpencil_colorpick_init(bContext *C, wmOperator *op, const wmEve
 
 	ED_region_visible_rect(tgpk->ar, &tgpk->rect);
 
+	/* GPXX: set xmin to 0 because toolbar is not computed properly 
+	 * by ED_region_visible_rect function */
+	tgpk->rect.xmin = 0;
+
 	/* get current material */
 	if ((tgpk->brush) && (tgpk->brush->gpencil_settings->material)) {
 		tgpk->mat = tgpk->brush->gpencil_settings->material;



More information about the Bf-blender-cvs mailing list