2.5:
[blender.git] / source / blender / editors / object / object_edit.c
index b849d57cc7d2c8ade3d8cdf695595f2de8442758..eb4150feb0c9178a7381534c316b487bf45ea2a1 100644 (file)
@@ -3732,6 +3732,7 @@ void ED_object_exit_editmode(bContext *C, int flag)
                WM_event_add_notifier(C, NC_SCENE|ND_MODE|NS_MODE_OBJECT, scene);
        }
 
+       obedit->mode &= ~OB_MODE_EDIT;
        ED_object_toggle_modes(C, obedit->restore_mode);
 }
 
@@ -3768,6 +3769,8 @@ void ED_object_enter_editmode(bContext *C, int flag)
 
        ob->restore_mode = ob->mode;
        ED_object_toggle_modes(C, ob->mode);
+
+       ob->mode |= OB_MODE_EDIT;
        
        if(ob->type==OB_MESH) {
                Mesh *me= ob->data;