Fix T48747: Stuck in edit mode after selecting another object in the animation editors

This commit is contained in:
Joshua Leung 2016-07-08 01:24:47 +12:00
parent 7f03c9de7e
commit 7793d1d26f
Notes: blender-bot 2023-02-14 07:47:55 +01:00
Referenced by issue #48747, Stuck in edit mode after object change via animation window object lists.
1 changed files with 4 additions and 0 deletions

View File

@ -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;
}