forked from bartvdbraak/blender
Fix T64822: curve widget point selection does not take into account DPI
This commit is contained in:
parent
f7b60f878b
commit
c0352551d2
@ -6530,7 +6530,7 @@ static int ui_do_but_CURVE(
|
||||
CurveMap *cuma = cumap->cm + cumap->cur;
|
||||
CurveMapPoint *cmp;
|
||||
const float m_xy[2] = {mx, my};
|
||||
float dist_min_sq = SQUARE(14.0f); /* 14 pixels radius */
|
||||
float dist_min_sq = SQUARE(U.dpi_fac * 14.0f); /* 14 pixels radius */
|
||||
int sel = -1;
|
||||
|
||||
if (event->ctrl) {
|
||||
@ -6565,7 +6565,7 @@ static int ui_do_but_CURVE(
|
||||
BLI_rctf_transform_pt_v(&but->rect, &cumap->curr, f_xy, &cmp[0].x);
|
||||
|
||||
/* with 160px height 8px should translate to the old 0.05 coefficient at no zoom */
|
||||
dist_min_sq = SQUARE(8.0f);
|
||||
dist_min_sq = SQUARE(U.dpi_fac * 8.0f);
|
||||
|
||||
/* loop through the curve segment table and find what's near the mouse. */
|
||||
for (i = 1; i <= CM_TABLE; i++) {
|
||||
|
Loading…
Reference in New Issue
Block a user