[Bf-blender-cvs] [b7016e69b3f] blender2.8: Cleanup: remove object-mode 'reset' check
Campbell Barton
noreply at git.blender.org
Fri Mar 2 03:32:13 CET 2018
Commit: b7016e69b3fff44d623f8413f9ebd4f7216a9b9b
Author: Campbell Barton
Date: Fri Mar 2 13:32:24 2018 +1100
Branches: blender2.8
https://developer.blender.org/rBb7016e69b3fff44d623f8413f9ebd4f7216a9b9b
Cleanup: remove object-mode 'reset' check
Silently fail when attempting to enter a mode that's not compatible
with the object.
===================================================================
M source/blender/editors/object/object_select.c
===================================================================
diff --git a/source/blender/editors/object/object_select.c b/source/blender/editors/object/object_select.c
index 9875fb84b56..3d65ca628f9 100644
--- a/source/blender/editors/object/object_select.c
+++ b/source/blender/editors/object/object_select.c
@@ -138,18 +138,7 @@ void ED_object_base_activate(bContext *C, Base *base)
view_layer->basact = base;
}
else {
- /* Apply the workspaces more to the object (when possible). */
- bool reset = true;
- if (base) {
- Object *ob_prev = OBACT(view_layer);
- Object *ob_curr = base->object;
- if (ob_prev != NULL) {
- if (ob_prev->type == ob_curr->type) {
- reset = false;
- }
- }
- }
-
+ /* Apply the workspaces mode to the object (when possible). */
Scene *scene = CTX_data_scene(C);
Object *obact = base ? base->object : NULL;
/* We don't know the previous active object in update.
@@ -176,9 +165,7 @@ void ED_object_base_activate(bContext *C, Base *base)
view_layer->basact = base;
- if (reset == false) {
- ED_object_mode_generic_enter(C, object_mode);
- }
+ ED_object_mode_generic_enter(C, object_mode);
}
if (base) {
More information about the Bf-blender-cvs
mailing list