[Bf-blender-cvs] [141f17eaf4a] blender-v2.92-release: Fix dope-sheet exiting edit-mode when activating an object
Campbell Barton
noreply at git.blender.org
Fri Jan 22 06:09:56 CET 2021
Commit: 141f17eaf4af89b434141715bffae348bfc4f4d2
Author: Campbell Barton
Date: Fri Jan 22 16:00:31 2021 +1100
Branches: blender-v2.92-release
https://developer.blender.org/rB141f17eaf4af89b434141715bffae348bfc4f4d2
Fix dope-sheet exiting edit-mode when activating an object
Regression from d8992192e5512380f57433df113f3e3f8b22f7cb
The original code relied on having a separate edit-object pointer
than the active object.
===================================================================
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 a7d02c0e6fb..a6e96a4d919 100644
--- a/source/blender/editors/animation/anim_channels_edit.c
+++ b/source/blender/editors/animation/anim_channels_edit.c
@@ -2988,18 +2988,16 @@ static int click_select_channel_object(bContext *C,
}
}
- /* change active object - regardless of whether it is now selected [T37883] */
- ED_object_base_activate(C, base); /* adds notifier */
+ /* Change active object - regardless of whether it is now selected, see: T37883.
+ *
+ * Ensure we exit edit-mode on whatever object was active before
+ * to avoid getting stuck there, see: T48747. */
+ ED_object_base_activate_with_mode_exit_if_needed(C, base); /* adds notifier */
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 != CTX_data_edit_object(C)) {
- ED_object_editmode_exit(C, EM_FREEDATA);
- }
return (ND_ANIMCHAN | NA_SELECTED);
}
More information about the Bf-blender-cvs
mailing list