[Bf-blender-cvs] [7793d1d] master: Fix T48747: Stuck in edit mode after selecting another object in the animation editors
Joshua Leung
noreply at git.blender.org
Thu Jul 7 15:53:51 CEST 2016
Commit: 7793d1d26f28459c477f71fcd2ee662a7e14dd04
Author: Joshua Leung
Date: Fri Jul 8 01:24:47 2016 +1200
Branches: master
https://developer.blender.org/rB7793d1d26f28459c477f71fcd2ee662a7e14dd04
Fix T48747: Stuck in edit mode after selecting another object in the animation editors
===================================================================
M source/blender/editors/animation/anim_channels_edit.c
===================================================================
diff --git a/source/blender/editors/animation/anim_channels_edit.c b/source/blender/editors/animation/anim_channels_edit.c
index 838e23b..af9b0a1 100644
--- a/source/blender/editors/animation/anim_channels_edit.c
+++ b/source/blender/editors/animation/anim_channels_edit.c
@@ -2705,6 +2705,10 @@ static int mouse_anim_channels(bContext *C, bAnimContext *ac, int channel_index,
if ((adt) && (adt->flag & ADT_UI_SELECTED))
adt->flag |= ADT_UI_ACTIVE;
+ /* ensure we exit editmode on whatever object was active before to avoid getting stuck there - T48747 */
+ if (ob != sce->obedit)
+ ED_object_editmode_exit(C, EM_FREEDATA | EM_FREEUNDO | EM_WAITCURSOR | EM_DO_UNDO);
+
notifierFlags |= (ND_ANIMCHAN | NA_SELECTED);
break;
}
More information about the Bf-blender-cvs
mailing list