summaryrefslogtreecommitdiffhomepage
path: root/spline-widget
diff options
context:
space:
mode:
Diffstat (limited to 'spline-widget')
-rw-r--r--spline-widget/qfunctionconfigurator.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/spline-widget/qfunctionconfigurator.cpp b/spline-widget/qfunctionconfigurator.cpp
index 73d6d3c2..18af8c46 100644
--- a/spline-widget/qfunctionconfigurator.cpp
+++ b/spline-widget/qfunctionconfigurator.cpp
@@ -132,8 +132,9 @@ void QFunctionConfigurator::drawFunction()
QPen pen(color, 1.2, Qt::SolidLine);
+ const double step_ = line_length_pixels / c.x();
+ const double step = std::max(1e-2, step_);
const double max = _config->maxInput();
- const double step = std::max(1e-2, max / 1000.);
painter.save();
painter.setPen(pen);