Fix T37796, Mesh lost after exiting sculpt mode and undoing.

Issue here is that upon entering sculpt mode, the mesh (and the object
mode) is stored in global undo. Now made the code similar to edit mode,
but since we don't really have any operator to push, this is just
ignored for now.

I have tried just disabling the sculpt toggle operator undo flag but
this didn't work due to the nature recursive of the operator calls
This commit is contained in:
2014-05-14 01:09:09 +03:00
parent 5cc1e03540
commit ea6620cb82

View File

@@ -105,6 +105,9 @@ void ED_undo_push(bContext *C, const char *str)
PE_undo_push(CTX_data_scene(C), str); PE_undo_push(CTX_data_scene(C), str);
} }
else if (obact && obact->mode & OB_MODE_SCULPT) {
/* do nothing for now */
}
else { else {
BKE_write_undo(C, str); BKE_write_undo(C, str);
} }