diff options
author | Campbell Barton <ideasman42@gmail.com> | 2018-02-09 14:14:17 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2018-02-09 14:14:39 +0300 |
commit | 5db950e860b2f64078cfc8cf00cb4f430b8a1baf (patch) | |
tree | b9a734351e0cfa849c3c136e4fc6f26276c7c5c0 /source/blender/editors/object/object_ops.c | |
parent | 25074be697cb5726328aa5d064a60788c1da6aeb (diff) |
Cleanup: use workspace for object_mode when possible
Diffstat (limited to 'source/blender/editors/object/object_ops.c')
-rw-r--r-- | source/blender/editors/object/object_ops.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/source/blender/editors/object/object_ops.c b/source/blender/editors/object/object_ops.c index 2aa2451b834..ba3541b428a 100644 --- a/source/blender/editors/object/object_ops.c +++ b/source/blender/editors/object/object_ops.c @@ -292,11 +292,9 @@ void ED_operatormacros_object(void) static int object_mode_poll(bContext *C) { - EvaluationContext eval_ctx; - CTX_data_eval_ctx(C, &eval_ctx); - + const WorkSpace *workspace = CTX_wm_workspace(C); Object *ob = CTX_data_active_object(C); - return (!ob || eval_ctx.object_mode == OB_MODE_OBJECT); + return (!ob || workspace->object_mode == OB_MODE_OBJECT); } void ED_keymap_object(wmKeyConfig *keyconf) |