Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2019-06-28 11:10:43 +0300
committerCampbell Barton <ideasman42@gmail.com>2019-06-28 11:22:53 +0300
commit9bcab8050f44e5bd36a0715811ee0355e4b221b6 (patch)
tree31d3d4abe5027df7759ae8dd8174fccd02fcb45b /source/blender/editors/util
parenteac11046a151dd1dfc175f2c3faf00a3baa99956 (diff)
Fix T63694: Crash using tool gizmos with multiple windows
Gizmo group types now store a user count so they aren't unlinked while other tools are using them. The tool system now works with multiple windows.
Diffstat (limited to 'source/blender/editors/util')
-rw-r--r--source/blender/editors/util/gizmo_utils.c7
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;