Cleanup: comments, replace 'undoes' with 'undo-steps'
This commit is contained in:
parent
ee585b9c21
commit
62195fb5b3
|
@ -375,7 +375,7 @@ static int brush_undo_preserve_cb(LibraryIDLinkCallbackData *cb_data)
|
|||
|
||||
static void brush_undo_preserve(BlendLibReader *reader, ID *id_new, ID *id_old)
|
||||
{
|
||||
/* Whole Brush is preserved across undoes. */
|
||||
/* Whole Brush is preserved across undo-steps. */
|
||||
BKE_lib_id_swap(NULL, id_new, id_old);
|
||||
|
||||
/* `id_new` now has content from `id_old`, we need to ensure those old ID pointers are valid.
|
||||
|
|
|
@ -127,7 +127,7 @@ static void palette_blend_read_data(BlendDataReader *reader, ID *id)
|
|||
|
||||
static void palette_undo_preserve(BlendLibReader *UNUSED(reader), ID *id_new, ID *id_old)
|
||||
{
|
||||
/* Whole Palette is preserved across undoes, and it has no extra pointer, simple. */
|
||||
/* Whole Palette is preserved across undo-steps, and it has no extra pointer, simple. */
|
||||
/* Note: We do not care about potential internal references to self here, Palette has none. */
|
||||
/* Note: We do not swap IDProperties, as dealing with potential ID pointers in those would be
|
||||
* fairly delicate. */
|
||||
|
|
|
@ -475,7 +475,7 @@ static void scene_foreach_rigidbodyworldSceneLooper(struct RigidBodyWorld *UNUSE
|
|||
|
||||
/**
|
||||
* This code is shared by both the regular `foreach_id` looper, and the code trying to restore or
|
||||
* preserve ID pointers like brushes across undoes.
|
||||
* preserve ID pointers like brushes across undo-steps.
|
||||
*/
|
||||
typedef enum eSceneForeachUndoPreserveProcess {
|
||||
/* Undo when preserving tool-settings from old scene, we also want to try to preserve that ID
|
||||
|
|
|
@ -287,7 +287,7 @@ void BKE_undosys_stack_clear(UndoStack *ustack)
|
|||
|
||||
void BKE_undosys_stack_clear_active(UndoStack *ustack)
|
||||
{
|
||||
/* Remove active and all following undoes. */
|
||||
/* Remove active and all following undo-steps. */
|
||||
UndoStep *us = ustack->step_active;
|
||||
|
||||
if (us) {
|
||||
|
@ -517,7 +517,7 @@ UndoPushReturn BKE_undosys_step_push_with_type(UndoStack *ustack,
|
|||
retval |= UNDO_PUSH_RET_OVERRIDE_CHANGED;
|
||||
}
|
||||
|
||||
/* Remove all undoes after (also when 'ustack->step_active == NULL'). */
|
||||
/* Remove all undo-steps after (also when 'ustack->step_active == NULL'). */
|
||||
while (ustack->steps.last != ustack->step_active) {
|
||||
UndoStep *us_iter = ustack->steps.last;
|
||||
undosys_step_free_and_unlink(ustack, us_iter);
|
||||
|
|
|
@ -314,8 +314,8 @@ struct MemFile *ED_undosys_stack_memfile_get_active(UndoStack *ustack)
|
|||
* If the last undo step is a memfile one, find the first #MemFileChunk matching given ID
|
||||
* (using its session UUID), and tag it as "changed in the future".
|
||||
*
|
||||
* Since non-memfile undoes cannot automatically set this flag in the previous step as done with
|
||||
* memfile ones, this has to be called manually by relevant undo code.
|
||||
* Since non-memfile undo-steps cannot automatically set this flag in the previous step as done
|
||||
* with memfile ones, this has to be called manually by relevant undo code.
|
||||
*
|
||||
* \note Only current known case for this is undoing a switch from Object to Sculpt mode (see
|
||||
* T82388).
|
||||
|
|
|
@ -183,7 +183,7 @@ void ED_editors_exit(Main *bmain, bool do_undo_system)
|
|||
return;
|
||||
}
|
||||
|
||||
/* Frees all edit-mode undoes. */
|
||||
/* Frees all edit-mode undo-steps. */
|
||||
if (do_undo_system && G_MAIN->wm.first) {
|
||||
wmWindowManager *wm = G_MAIN->wm.first;
|
||||
/* normally we don't check for NULL undo stack,
|
||||
|
|
Loading…
Reference in New Issue