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/object/object_edit.c')
-rw-r--r--source/blender/editors/object/object_edit.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/source/blender/editors/object/object_edit.c b/source/blender/editors/object/object_edit.c
index 7a75e3875ea..8102b1bfb9c 100644
--- a/source/blender/editors/object/object_edit.c
+++ b/source/blender/editors/object/object_edit.c
@@ -340,7 +340,7 @@ static int object_add_mesh_exec(bContext *C, wmOperator *op)
if(obedit==NULL || obedit->type!=OB_MESH) {
object_add_type(C, OB_MESH);
- ED_object_enter_editmode(C, 0);
+ ED_object_enter_editmode(C, EM_DO_UNDO);
newob = 1;
}
else DAG_object_flush_update(CTX_data_scene(C), obedit, OB_RECALC_DATA);
@@ -398,8 +398,8 @@ void OBJECT_OT_mesh_add(wmOperatorType *ot)
ot->poll= ED_operator_scene_editable;
- /* flags */
- ot->flag= 0;
+ /* flags: no register or undo, this operator calls operators */
+ ot->flag= 0; //OPTYPE_REGISTER|OPTYPE_UNDO;
RNA_def_enum(ot->srna, "type", prop_mesh_types, 0, "Primitive", "");
}
@@ -1395,7 +1395,8 @@ static int parent_clear_exec(bContext *C, wmOperator *op)
DAG_scene_sort(CTX_data_scene(C));
ED_anim_dag_flush_update(C);
-
+ WM_event_add_notifier(C, NC_OBJECT|ND_TRANSFORM, NULL);
+
return OPERATOR_FINISHED;
}
@@ -2600,7 +2601,8 @@ static int parent_set_exec(bContext *C, wmOperator *op)
CTX_DATA_END;
DAG_scene_sort(CTX_data_scene(C));
- ED_anim_dag_flush_update(C);
+ ED_anim_dag_flush_update(C);
+ WM_event_add_notifier(C, NC_OBJECT|ND_TRANSFORM, NULL);
return OPERATOR_FINISHED;
}
@@ -2648,7 +2650,7 @@ void OBJECT_OT_parent_set(wmOperatorType *ot)
ot->poll= ED_operator_object_active;
/* flags */
- ot->flag= 0;
+ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
RNA_def_enum(ot->srna, "type", prop_make_parent_types, 0, "Type", "");
}
@@ -3349,6 +3351,7 @@ void ED_object_enter_editmode(bContext *C, int flag)
WM_event_add_notifier(C, NC_SCENE|ND_MODE|NS_MODE_OBJECT, scene);
}
+ if(flag & EM_DO_UNDO) ED_undo_push(C, "Enter Editmode");
if(flag & EM_WAITCURSOR) waitcursor(0);
}