diff options
author | Campbell Barton <ideasman42@gmail.com> | 2021-04-19 10:17:49 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2021-04-19 10:17:49 +0300 |
commit | 9175911ffabefcd00f15d847ffdf8afe5efadb10 (patch) | |
tree | 3fb02af6d086fcdba0725010f93a20e8ae4486d9 /source/blender/editors/interface/interface_region_tooltip.c | |
parent | 063c9938f1ecb52ddb697096918974485ef81da3 (diff) |
Fix spin-gizmo button tool-tip placement
gizmo_button2d_bounds result wasn't valid when the gizmo was part
of a 3D gizmo group.
Regression in cf6d17a6aa421e0038fc1f8e60e3f1f708887c3e
Diffstat (limited to 'source/blender/editors/interface/interface_region_tooltip.c')
-rw-r--r-- | source/blender/editors/interface/interface_region_tooltip.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/source/blender/editors/interface/interface_region_tooltip.c b/source/blender/editors/interface/interface_region_tooltip.c index 07e17033ee5..b11a727b173 100644 --- a/source/blender/editors/interface/interface_region_tooltip.c +++ b/source/blender/editors/interface/interface_region_tooltip.c @@ -1469,9 +1469,10 @@ ARegion *UI_tooltip_create_from_gizmo(bContext *C, wmGizmo *gz) */ if (gz->type->screen_bounds_get) { rcti bounds; - gz->type->screen_bounds_get(C, gz, &bounds); - init_position[0] = bounds.xmin; - init_position[1] = bounds.ymin; + if (gz->type->screen_bounds_get(C, gz, &bounds)) { + init_position[0] = bounds.xmin; + init_position[1] = bounds.ymin; + } } return ui_tooltip_create_with_data(C, data, init_position, NULL, aspect); |