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:
authorCampbell Barton <ideasman42@gmail.com>2018-03-02 05:32:24 +0300
committerCampbell Barton <ideasman42@gmail.com>2018-03-02 05:37:35 +0300
commitb7016e69b3fff44d623f8413f9ebd4f7216a9b9b (patch)
treec725430b58b6c989aed542d577a28caafb444ee0 /source/blender/editors/object/object_select.c
parent4df2179f19152243f0c5eb95e34c191659251546 (diff)
Cleanup: remove object-mode 'reset' check
Silently fail when attempting to enter a mode that's not compatible with the object.
Diffstat (limited to 'source/blender/editors/object/object_select.c')
-rw-r--r--source/blender/editors/object/object_select.c17
1 files changed, 2 insertions, 15 deletions
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) {