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
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2020-08-18 04:53:53 +0300
committerCampbell Barton <ideasman42@gmail.com>2020-08-18 05:09:30 +0300
commitd1057890c40b6f50d0a13215eec90ab1af03a44b (patch)
tree7557ae57a1b79fe94a64615c5cdc1161831a812a /source/blender/editors/curve
parent6978635622cc77a559a3f888945d840e2e80a52d (diff)
Fix incorrect pixelsize use where DPI scale was intended
Changing line-width shouldn't scale cursor motion. Related to T79787. Use dpi_fac for scaling curve error threshold & number button drag threshold calculation.
Diffstat (limited to 'source/blender/editors/curve')
-rw-r--r--source/blender/editors/curve/editcurve_paint.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/editors/curve/editcurve_paint.c b/source/blender/editors/curve/editcurve_paint.c
index 748bf040fbb..ebad1995717 100644
--- a/source/blender/editors/curve/editcurve_paint.c
+++ b/source/blender/editors/curve/editcurve_paint.c
@@ -666,7 +666,7 @@ static void curve_draw_exec_precalc(wmOperator *op)
selem_prev = selem;
}
scale_px = ((len_3d > 0.0f) && (len_2d > 0.0f)) ? (len_3d / len_2d) : 0.0f;
- float error_threshold = (cps->error_threshold * U.pixelsize) * scale_px;
+ float error_threshold = (cps->error_threshold * U.dpi_fac) * scale_px;
RNA_property_float_set(op->ptr, prop, error_threshold);
}
@@ -685,7 +685,7 @@ static void curve_draw_exec_precalc(wmOperator *op)
}
if (len_squared_v2v2(selem_first->mval, selem_last->mval) <=
- square_f(STROKE_CYCLIC_DIST_PX * U.pixelsize)) {
+ square_f(STROKE_CYCLIC_DIST_PX * U.dpi_fac)) {
use_cyclic = true;
}
}