diff options
author | Campbell Barton <ideasman42@gmail.com> | 2014-06-18 10:29:03 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2014-06-18 10:29:03 +0400 |
commit | bb9719b7ab236508c587bd51beeff9b4d85b58e7 (patch) | |
tree | 22bccab7ccb0e3a7fb808244cdc4c1384872252d /source/blender | |
parent | 24c7adde0fb922d802b817edb0508c770e1681e0 (diff) |
Code cleanup: replace direct operator calls with ED_object_toggle_modes
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/editors/object/object_edit.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/editors/object/object_edit.c b/source/blender/editors/object/object_edit.c index 62a31a3fb5a..aba792413af 100644 --- a/source/blender/editors/object/object_edit.c +++ b/source/blender/editors/object/object_edit.c @@ -1620,20 +1620,20 @@ static int object_mode_set_exec(bContext *C, wmOperator *op) /* Exit current mode if it's not the mode we're setting */ if (mode != OB_MODE_OBJECT && (ob->mode != mode || toggle)) { /* Enter new mode */ - WM_operator_name_call(C, object_mode_op_string(mode), WM_OP_EXEC_REGION_WIN, NULL); + ED_object_toggle_modes(C, mode); } if (toggle) { /* Special case for Object mode! */ if (mode == OB_MODE_OBJECT && restore_mode == OB_MODE_OBJECT && ob->restore_mode != OB_MODE_OBJECT) { - WM_operator_name_call(C, object_mode_op_string(ob->restore_mode), WM_OP_EXEC_REGION_WIN, NULL); + ED_object_toggle_modes(C, ob->restore_mode); } else if (ob->mode == mode) { /* For toggling, store old mode so we know what to go back to */ ob->restore_mode = restore_mode; } else if (ob->restore_mode != OB_MODE_OBJECT && ob->restore_mode != mode) { - WM_operator_name_call(C, object_mode_op_string(ob->restore_mode), WM_OP_EXEC_REGION_WIN, NULL); + ED_object_toggle_modes(C, ob->restore_mode); } } |