Fix T38427: Sculpt mode dimension changes don't Undo

This commit is contained in:
Sergey Sharybin 2014-02-04 19:47:17 +06:00
parent 1d260d84ad
commit 30b5aef678
3 changed files with 8 additions and 2 deletions

@ -4376,7 +4376,7 @@ static void sculpt_restore_mesh(Sculpt *sd, Object *ob)
}
/* Copy the PBVH bounding box into the object's bounding box */
static void sculpt_update_object_bounding_box(Object *ob)
void sculpt_update_object_bounding_box(Object *ob)
{
if (ob->bb) {
float bb_min[3], bb_max[3];

@ -132,4 +132,6 @@ void sculpt_undo_push_end(void);
void sculpt_vertcos_to_key(Object *ob, KeyBlock *kb, float (*vertCos)[3]);
void sculpt_update_object_bounding_box(struct Object *ob);
#endif

@ -487,8 +487,12 @@ static void sculpt_undo_restore(bContext *C, ListBase *lb)
tag_update |= 1;
}
if (tag_update)
if (tag_update) {
DAG_id_tag_update(&ob->id, OB_RECALC_DATA);
}
else {
sculpt_update_object_bounding_box(ob);
}
/* for non-PBVH drawing, need to recreate VBOs */
GPU_drawobject_free(ob->derivedFinal);