Fix for sculpt undo updating hidden rather than coords.

Fixes bug [#31858] Undo + sculpt mode, which exposed the bug by having
two objects use the same mesh data.

The rebuild variable was initialize to true, so multires data was
getting marked as having GridHidden modified rather than coords
modified.
This commit is contained in:
Nicholas Bishop
2012-06-18 17:49:31 +00:00
parent c83805139d
commit 58befeba60

View File

@@ -269,7 +269,7 @@ static void sculpt_undo_restore(bContext *C, ListBase *lb)
SculptSession *ss = ob->sculpt;
SculptUndoNode *unode;
MultiresModifierData *mmd;
int update = 0, rebuild = 1;
int update = FALSE, rebuild = FALSE;
sculpt_update_mesh_elements(scene, sd, ob, 0);
@@ -297,15 +297,15 @@ static void sculpt_undo_restore(bContext *C, ListBase *lb)
switch (unode->type) {
case SCULPT_UNDO_COORDS:
if (sculpt_undo_restore_coords(C, dm, unode))
update = 1;
update = TRUE;
break;
case SCULPT_UNDO_HIDDEN:
if (sculpt_undo_restore_hidden(C, dm, unode))
rebuild = 1;
rebuild = TRUE;
break;
case SCULPT_UNDO_MASK:
if (sculpt_undo_restore_mask(C, dm, unode))
update = 1;
update = TRUE;
break;
}
}