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
path: root/source
diff options
context:
space:
mode:
authorPratik Borhade <PratikPB2123>2021-05-19 14:46:55 +0300
committerJeroen Bakker <jeroen@blender.org>2021-05-19 14:47:40 +0300
commit9e6c4be731a594593cb7cba96f33ed2d17d71b7f (patch)
tree67c81de1d6a6fd409fe9ff8bf008a7a849367731 /source
parentd67223ca297ceef4e790bf5504f38fea03941e79 (diff)
Fix T88167: Regression: no tooltip for syringe/picker, during picking object
Fix T88167. Caused by {rB97defd9cd79b6e3ed0e52481a7078107dbe0522b} `(BLI_rcti_isect_pt` used here to confirm if cursor position is in between active region boundary. Subtracting min region boundary from the mouse position before the check, fails the condition. `mval[2]` introduced to hold the region relative mouse position. Reviewed By: Severin Maniphest Tasks: T88167 Differential Revision: https://developer.blender.org/D11224
Diffstat (limited to 'source')
-rw-r--r--source/blender/editors/interface/interface_eyedropper.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/source/blender/editors/interface/interface_eyedropper.c b/source/blender/editors/interface/interface_eyedropper.c
index 178f663ff58..e4f502950ab 100644
--- a/source/blender/editors/interface/interface_eyedropper.c
+++ b/source/blender/editors/interface/interface_eyedropper.c
@@ -130,14 +130,19 @@ void eyedropper_draw_cursor_text_region(const struct bContext *C,
const char *name)
{
wmWindow *win = CTX_wm_window(C);
- const int x = win->eventstate->x - region->winrct.xmin;
- const int y = win->eventstate->y - region->winrct.ymin;
+ const int x = win->eventstate->x;
+ const int y = win->eventstate->y;
if ((name[0] == '\0') || (BLI_rcti_isect_pt(&region->winrct, x, y) == false)) {
return;
}
- eyedropper_draw_cursor_text_ex(x, y, name);
+ const int mval[2] = {
+ x - region->winrct.xmin,
+ y - region->winrct.ymin,
+ };
+
+ eyedropper_draw_cursor_text_ex(mval[0], mval[1], name);
}
/**