Sculpt: Fix undo when shape keys are used

Can not use undo node's total vertices count, it only contains
single PBVH node vertex count. Need to pass an entire key block
number of vertices.
This commit is contained in:
2019-03-11 16:29:51 +01:00
parent 005084ef62
commit 251c3e9a81

View File

@@ -194,7 +194,7 @@ static bool sculpt_undo_restore_coords(bContext *C, SculptUndoNode *unode)
/* pbvh uses it's own mvert array, so coords should be */
/* propagated to pbvh here */
BKE_pbvh_apply_vertCos(ss->pbvh, vertCos, unode->totvert);
BKE_pbvh_apply_vertCos(ss->pbvh, vertCos, ss->kb->totelem);
MEM_freeN(vertCos);
}