Fix multi-object state on load
authorCampbell Barton <ideasman42@gmail.com>
Mon, 17 Dec 2018 23:22:42 +0000 (10:22 +1100)
committerCampbell Barton <ideasman42@gmail.com>
Mon, 17 Dec 2018 23:22:42 +0000 (10:22 +1100)
D4091 by @zazizizou

source/blender/editors/util/ed_util.c

index d2bed9ca06ef37c2b2900cf4fbb48fe56d2827c9..b3ec0a4388fcc326dafbdc70854b6e239b97843b 100644 (file)
@@ -122,7 +122,7 @@ void ED_editors_init(bContext *C)
                                if (ob->type != OB_GPENCIL) {
                                        ID *data = ob->data;
                                        ob->mode = OB_MODE_OBJECT;
-                                       if ((ob == obact) && !ID_IS_LINKED(ob) && !(data && ID_IS_LINKED(data))) {
+                                       if ((ob->type == obact->type) && !ID_IS_LINKED(ob) && !(data && ID_IS_LINKED(data))) {
                                                if (mode == OB_MODE_EDIT) {
                                                        ED_object_editmode_enter_ex(bmain, scene, ob, 0);
                                                }