diff options
Diffstat (limited to 'qfunctionconfigurator/functionconfig.cpp')
-rw-r--r-- | qfunctionconfigurator/functionconfig.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/qfunctionconfigurator/functionconfig.cpp b/qfunctionconfigurator/functionconfig.cpp index 6d1a48b4..7edbe0ef 100644 --- a/qfunctionconfigurator/functionconfig.cpp +++ b/qfunctionconfigurator/functionconfig.cpp @@ -74,9 +74,6 @@ void Map::reload() { QList<QPointF> input = cur.input; auto& data = cur.data; - if (input.size() && input[0].x() > 1e-2) - input.prepend(QPointF(0, 0)); - data = std::vector<float>(value_count); const int mult = precision(); @@ -92,6 +89,8 @@ void Map::reload() { data[k] = input[0].y() * k / (input[0].x() * mult); } } + else if (input[0].x() > 1e-2) + input.prepend(QPointF(0, 0)); for (int i = 0; i < sz; i++) { QPointF p0 = ensureInBounds(input, i - 1); |