diff options
Diffstat (limited to 'source/blender/editors/util/gizmo_utils.c')
-rw-r--r-- | source/blender/editors/util/gizmo_utils.c | 44 |
1 files changed, 22 insertions, 22 deletions
diff --git a/source/blender/editors/util/gizmo_utils.c b/source/blender/editors/util/gizmo_utils.c index 002425b11b6..d330019c816 100644 --- a/source/blender/editors/util/gizmo_utils.c +++ b/source/blender/editors/util/gizmo_utils.c @@ -34,39 +34,39 @@ #include "ED_gizmo_utils.h" -bool ED_gizmo_poll_or_unlink_delayed_from_operator( - const bContext *C, wmGizmoGroupType *gzgt, - const char *idname) +bool ED_gizmo_poll_or_unlink_delayed_from_operator(const bContext *C, + wmGizmoGroupType *gzgt, + const char *idname) { #if 0 - /* Causes selection to continue showing the last gizmo. */ - wmOperator *op = WM_operator_last_redo(C); + /* Causes selection to continue showing the last gizmo. */ + wmOperator *op = WM_operator_last_redo(C); #else - wmWindowManager *wm = CTX_wm_manager(C); - wmOperator *op = wm->operators.last; + wmWindowManager *wm = CTX_wm_manager(C); + wmOperator *op = wm->operators.last; #endif - if (op == NULL || !STREQ(op->type->idname, idname)) { - WM_gizmo_group_type_unlink_delayed_ptr(gzgt); - return false; - } - return true; + if (op == NULL || !STREQ(op->type->idname, idname)) { + WM_gizmo_group_type_unlink_delayed_ptr(gzgt); + return false; + } + return true; } -bool ED_gizmo_poll_or_unlink_delayed_from_tool_ex(const bContext *C, wmGizmoGroupType *gzgt, const char *gzgt_idname) +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)) - { - WM_gizmo_group_type_unlink_delayed_ptr(gzgt); - return false; - } - return true; + 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); + 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); + return ED_gizmo_poll_or_unlink_delayed_from_tool_ex(C, gzgt, gzgt->idname); } |