[Bf-blender-cvs] [be53b9afe50] greasepencil-object: Fix: Adding GP Monkey didn't refresh Properties Editor

Joshua Leung noreply at git.blender.org
Fri Mar 16 07:23:19 CET 2018


Commit: be53b9afe504ec19a9cb2602741d92d416b0f4bc
Author: Joshua Leung
Date:   Fri Mar 16 19:19:19 2018 +1300
Branches: greasepencil-object
https://developer.blender.org/rBbe53b9afe504ec19a9cb2602741d92d416b0f4bc

Fix: Adding GP Monkey didn't refresh Properties Editor

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

M	source/blender/editors/object/object_add.c
M	source/blender/editors/space_buttons/space_buttons.c

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

diff --git a/source/blender/editors/object/object_add.c b/source/blender/editors/object/object_add.c
index c8002e2308f..b32a3adb59d 100644
--- a/source/blender/editors/object/object_add.c
+++ b/source/blender/editors/object/object_add.c
@@ -1038,7 +1038,7 @@ static int object_gpencil_add_exec(bContext *C, wmOperator *op)
 	}
 	else {
 		DEG_id_tag_update(&ob->id, OB_RECALC_DATA);
-		WM_event_add_notifier(C, NC_GPENCIL | ND_DATA, NULL);
+		WM_event_add_notifier(C, NC_GPENCIL | ND_DATA | NA_ADDED, NULL);
 	}
 	
 	/* create relevant geometry */
diff --git a/source/blender/editors/space_buttons/space_buttons.c b/source/blender/editors/space_buttons/space_buttons.c
index 179780bf517..48aaebca51d 100644
--- a/source/blender/editors/space_buttons/space_buttons.c
+++ b/source/blender/editors/space_buttons/space_buttons.c
@@ -407,6 +407,13 @@ static void buttons_area_listener(
 					break;
 			}
 			break;
+		case NC_GPENCIL:
+			switch(wmn->data) {
+				case ND_DATA:
+					if (ELEM(wmn->action, NA_EDITED, NA_ADDED, NA_REMOVED))
+						ED_area_tag_redraw(sa);
+					break;
+			}
 		case NC_NODE:
 			if (wmn->action == NA_SELECTED) {
 				ED_area_tag_redraw(sa);



More information about the Bf-blender-cvs mailing list