diff options
author | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2019-05-19 11:03:45 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2019-05-19 12:33:27 +0300 |
commit | c0352551d2fdd3d192558f04cfb52dc47c05ba88 (patch) | |
tree | f54fc55a2e667d1635acc5b2b85eabee2f2f3d92 /source/blender | |
parent | f7b60f878bcb7f2ec813f20a6306366af4415343 (diff) |
Fix T64822: curve widget point selection does not take into account DPI
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/editors/interface/interface_handlers.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/editors/interface/interface_handlers.c b/source/blender/editors/interface/interface_handlers.c index a3b438ece42..bcd6813128d 100644 --- a/source/blender/editors/interface/interface_handlers.c +++ b/source/blender/editors/interface/interface_handlers.c @@ -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++) { |