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>2018-09-24 10:12:54 +0300
committerCampbell Barton <ideasman42@gmail.com>2018-09-24 10:13:16 +0300
commit3d860f53e8becaa8c500b250f5c9ac7215c4f6bf (patch)
tree51bea897b0afdf6ecec31354fa8655c178dec3d9 /source/blender/editors/util/gizmo_utils.c
parent6db79dafb3edac432a2ef98b5fb7fe94b6f746fd (diff)
Gizmo: hide redo gizmo when spin tool not active
Selecting a another tool left the gizmo, which could overlap other tools gizmos.
Diffstat (limited to 'source/blender/editors/util/gizmo_utils.c')
-rw-r--r--source/blender/editors/util/gizmo_utils.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/source/blender/editors/util/gizmo_utils.c b/source/blender/editors/util/gizmo_utils.c
index 86eb2c1c003..6b150f93e38 100644
--- a/source/blender/editors/util/gizmo_utils.c
+++ b/source/blender/editors/util/gizmo_utils.c
@@ -57,15 +57,20 @@ bool ED_gizmo_poll_or_unlink_delayed_from_operator(
return true;
}
-/** Can use this as poll function directly. */
-bool ED_gizmo_poll_or_unlink_delayed_from_tool(const bContext *C, wmGizmoGroupType *gzgt)
+bool ED_gizmo_poll_or_unlink_delayed_from_tool_ex(const bContext *C, wmGizmoGroupType *gzgt, const char *gzgt_idname)
{
bToolRef_Runtime *tref_rt = WM_toolsystem_runtime_from_context((bContext *)C);
if ((tref_rt == NULL) ||
- !STREQ(gzgt->idname, tref_rt->gizmo_group))
+ !STREQ(gzgt_idname, tref_rt->gizmo_group))
{
WM_gizmo_group_type_unlink_delayed_ptr(gzgt);
return false;
}
return true;
}
+
+/** Can use this as poll function directly. */
+bool ED_gizmo_poll_or_unlink_delayed_from_tool(const bContext *C, wmGizmoGroupType *gzgt)
+{
+ return ED_gizmo_poll_or_unlink_delayed_from_tool_ex(C, gzgt, gzgt->idname);
+}