Fix T68202: GPencil Set Origin do not refresh until object is moved
authorAntonio Vazquez <blendergit@gmail.com>
Sun, 4 Aug 2019 08:21:02 +0000 (10:21 +0200)
committerAntonio Vazquez <blendergit@gmail.com>
Sun, 4 Aug 2019 08:21:02 +0000 (10:21 +0200)
source/blender/editors/object/object_transform.c

index 5934eab62bb9e35ef4e1f593d337b34fbf6d5146..975aa0f5bacb697e7ef70a0fc18330576a31bf63 100644 (file)
@@ -1337,12 +1337,13 @@ static int object_origin_set_exec(bContext *C, wmOperator *op)
                 }
               }
             }
-            DEG_id_tag_update(&gpd->id, ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY);
-
             tot_change++;
             if (centermode == ORIGIN_TO_GEOMETRY) {
               copy_v3_v3(ob->loc, gpcenter);
             }
+            DEG_id_tag_update(&gpd->id, ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY);
+            DEG_id_tag_update(&ob->id, ID_RECALC_TRANSFORM);
+
             ob->id.tag |= LIB_TAG_DOIT;
             do_inverse_offset = true;
           }