summaryrefslogtreecommitdiffhomepage
path: root/spline-widget/qfunctionconfigurator.cpp
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2016-05-26 17:27:02 +0200
committerStanislaw Halik <sthalik@misaki.pl>2016-05-26 17:32:54 +0200
commit26de6a0ad9ed082e14de928ef03f4db379e9686f (patch)
tree3b7deb488cf1e63a74d49f027302d45ecaed2a8a /spline-widget/qfunctionconfigurator.cpp
parent00693645d876ff969a865e7f609abdc474750c77 (diff)
spline-widget: step by few pixels and not a random constant amount
Diffstat (limited to 'spline-widget/qfunctionconfigurator.cpp')
-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);