Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/editors/util/undo.c')
-rw-r--r--source/blender/editors/util/undo.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/source/blender/editors/util/undo.c b/source/blender/editors/util/undo.c
index ab882a388ad..ee6101d2952 100644
--- a/source/blender/editors/util/undo.c
+++ b/source/blender/editors/util/undo.c
@@ -108,7 +108,7 @@ void ED_undo_push(bContext *C, const char *str)
/* do nothing for now */
}
else {
- BKE_write_undo(C, str);
+ BKE_undo_write(C, str);
}
if (wm->file_saved) {
@@ -244,7 +244,7 @@ void ED_undo_pop_op(bContext *C, wmOperator *op)
}
/* name optionally, function used to check for operator redo panel */
-int ED_undo_valid(const bContext *C, const char *undoname)
+bool ED_undo_is_valid(const bContext *C, const char *undoname)
{
Object *obedit = CTX_data_edit_object(C);
Object *obact = CTX_data_active_object(C);
@@ -263,7 +263,7 @@ int ED_undo_valid(const bContext *C, const char *undoname)
}
else if (obedit) {
if (OB_TYPE_SUPPORT_EDITMODE(obedit->type)) {
- return undo_editmode_valid(undoname);
+ return undo_editmode_is_valid(undoname);
}
}
else {
@@ -271,19 +271,19 @@ int ED_undo_valid(const bContext *C, const char *undoname)
/* if below tests fail, global undo gets executed */
if (obact && obact->mode & OB_MODE_TEXTURE_PAINT) {
- if (ED_undo_paint_valid(UNDO_PAINT_IMAGE, undoname))
+ if (ED_undo_paint_is_valid(UNDO_PAINT_IMAGE, undoname))
return 1;
}
else if (obact && obact->mode & OB_MODE_SCULPT) {
- if (ED_undo_paint_valid(UNDO_PAINT_MESH, undoname))
+ if (ED_undo_paint_is_valid(UNDO_PAINT_MESH, undoname))
return 1;
}
else if (obact && obact->mode & OB_MODE_PARTICLE_EDIT) {
- return PE_undo_valid(CTX_data_scene(C));
+ return PE_undo_is_valid(CTX_data_scene(C));
}
if (U.uiflag & USER_GLOBALUNDO) {
- return BKE_undo_valid(undoname);
+ return BKE_undo_is_valid(undoname);
}
}
return 0;
@@ -487,7 +487,8 @@ static int get_undo_system(bContext *C)
static EnumPropertyItem *rna_undo_itemf(bContext *C, int undosys, int *totitem)
{
EnumPropertyItem item_tmp = {0}, *item = NULL;
- int active, i = 0;
+ int i = 0;
+ bool active;
while (true) {
const char *name = NULL;