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
This commit is contained in:
committed by
Jeroen Bakker
parent
d67223ca29
commit
9e6c4be731
@@ -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(®ion->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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user