diff options
author | Campbell Barton <ideasman42@gmail.com> | 2019-06-28 11:10:43 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2019-06-28 11:22:53 +0300 |
commit | 9bcab8050f44e5bd36a0715811ee0355e4b221b6 (patch) | |
tree | 31d3d4abe5027df7759ae8dd8174fccd02fcb45b /source/blender/windowmanager/gizmo/WM_gizmo_types.h | |
parent | eac11046a151dd1dfc175f2c3faf00a3baa99956 (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/windowmanager/gizmo/WM_gizmo_types.h')
-rw-r--r-- | source/blender/windowmanager/gizmo/WM_gizmo_types.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/source/blender/windowmanager/gizmo/WM_gizmo_types.h b/source/blender/windowmanager/gizmo/WM_gizmo_types.h index 7afd2908b8e..68ecdeea936 100644 --- a/source/blender/windowmanager/gizmo/WM_gizmo_types.h +++ b/source/blender/windowmanager/gizmo/WM_gizmo_types.h @@ -417,6 +417,12 @@ typedef struct wmGizmoGroupType { /** Same as gizmo-maps, so registering/unregistering goes to the correct region. */ struct wmGizmoMapType_Params gzmap_params; + /** + * Number of #wmGizmoGroup instances. + * Decremented when 'tag_remove' is set, or when removed. + */ + int users; + } wmGizmoGroupType; typedef struct wmGizmoGroup { @@ -432,6 +438,8 @@ typedef struct wmGizmoGroup { /** Errors and warnings storage. */ struct ReportList *reports; + bool tag_remove; + void *customdata; /** For freeing customdata from above. */ void (*customdata_free)(void *); |