[Bf-blender-cvs] [edb8eb13c31] temp-object-multi-mode: Fix selection updating

Campbell Barton noreply at git.blender.org
Tue Apr 10 20:30:36 CEST 2018


Commit: edb8eb13c31c3338c758eb46396c3f9bebe71b2c
Author: Campbell Barton
Date:   Tue Apr 10 20:30:28 2018 +0200
Branches: temp-object-multi-mode
https://developer.blender.org/rBedb8eb13c31c3338c758eb46396c3f9bebe71b2c

Fix selection updating

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

M	source/blender/editors/space_view3d/space_view3d.c

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

diff --git a/source/blender/editors/space_view3d/space_view3d.c b/source/blender/editors/space_view3d/space_view3d.c
index abfbccdcc27..102afe0e394 100644
--- a/source/blender/editors/space_view3d/space_view3d.c
+++ b/source/blender/editors/space_view3d/space_view3d.c
@@ -911,12 +911,19 @@ static void view3d_main_region_listener(
 				{
 					WM_manipulatormap_tag_refresh(mmap);
 
-					ViewLayer *view_layer = WM_window_get_active_view_layer(wmn->window);
-					Object *obedit = OBEDIT_FROM_VIEW_LAYER(view_layer);
-					if (obedit) {
-						/* TODO(sergey): Notifiers shouldn't really be doing DEG tags. */
-						DEG_id_tag_update((ID *)obedit->data, DEG_TAG_SELECT_UPDATE);
+					ID *obdata = NULL;
+					if (wmn->reference && ELEM(GS(((ID *)wmn->reference)->name), ID_ME)) {
+						obdata = wmn->reference;
 					}
+					else {
+						ViewLayer *view_layer = WM_window_get_active_view_layer(wmn->window);
+						Object *obedit = OBEDIT_FROM_VIEW_LAYER(view_layer);
+						if (obedit) {
+							/* TODO(sergey): Notifiers shouldn't really be doing DEG tags. */
+							obdata = obedit->data;
+						}
+					}
+					DEG_id_tag_update(obdata, DEG_TAG_SELECT_UPDATE);
 					ATTR_FALLTHROUGH;
 				}
 				case ND_DATA:



More information about the Bf-blender-cvs mailing list