diff options
Diffstat (limited to 'source/blender/editors/util')
-rw-r--r-- | source/blender/editors/util/gizmo_utils.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/source/blender/editors/util/gizmo_utils.c b/source/blender/editors/util/gizmo_utils.c index d330019c816..b856c831424 100644 --- a/source/blender/editors/util/gizmo_utils.c +++ b/source/blender/editors/util/gizmo_utils.c @@ -59,7 +59,12 @@ bool ED_gizmo_poll_or_unlink_delayed_from_tool_ex(const bContext *C, { bToolRef_Runtime *tref_rt = WM_toolsystem_runtime_from_context((bContext *)C); if ((tref_rt == NULL) || !STREQ(gzgt_idname, tref_rt->gizmo_group)) { - WM_gizmo_group_type_unlink_delayed_ptr(gzgt); + ScrArea *sa = CTX_wm_area(C); + wmGizmoMapType *gzmap_type = WM_gizmomaptype_ensure(&gzgt->gzmap_params); + WM_gizmo_group_unlink_delayed_ptr_from_space(gzgt, gzmap_type, sa); + if (gzgt->users == 0) { + WM_gizmo_group_type_unlink_delayed_ptr(gzgt); + } return false; } return true; |