From 0fb267c19925a949a8b1f8c62d9fbe52ba821d3d Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Fri, 6 Nov 2015 00:44:35 +0100 Subject: qfc: always ensure at least one point exists Previously, insertion of the lone point was postponed until opening the mapping window. --- spline-widget/functionconfig.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'spline-widget/functionconfig.h') diff --git a/spline-widget/functionconfig.h b/spline-widget/functionconfig.h index 97a80cac..145ee14e 100644 --- a/spline-widget/functionconfig.h +++ b/spline-widget/functionconfig.h @@ -30,7 +30,7 @@ private: struct State { QList input; - std::vector data; + std::vector data; }; int precision() const; @@ -52,6 +52,8 @@ public: { setMaxInput(maxx); setMaxOutput(maxy); + if (cur.input.size() == 0) + cur.input.push_back(QPointF(maxx, maxy)); reload(); } -- cgit v1.2.3