summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2015-08-28 14:24:41 +0200
committerStanislaw Halik <sthalik@misaki.pl>2015-08-28 14:24:41 +0200
commit5090466908ddf92b7566f4215985c2e7d7dc93d7 (patch)
treea9eac87aac67e043be3129b7ff6a458a343292c3
parent303f621e3091e2bbe12f6a5e2e35310f6e9b0701 (diff)
qfc: also draw line from function start while moving
-rw-r--r--qfunctionconfigurator/qfunctionconfigurator.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/qfunctionconfigurator/qfunctionconfigurator.cpp b/qfunctionconfigurator/qfunctionconfigurator.cpp
index a977af77..d9cf6d52 100644
--- a/qfunctionconfigurator/qfunctionconfigurator.cpp
+++ b/qfunctionconfigurator/qfunctionconfigurator.cpp
@@ -162,6 +162,8 @@ void QFunctionConfigurator::paintEvent(QPaintEvent *e)
QPen pen(Qt::white, 1, Qt::SolidLine);
QList<QPointF> points = _config->getPoints();
if (points.size() && moving_control_point_idx >= 0 && moving_control_point_idx < points.size()) {
+ if (points[0].x() > 1e-2)
+ points.prepend(QPointF(0, 0));
QPointF prev = point_to_pixel(points[0]);
for (int i = 1; i < points.size(); i++) {
auto tmp = point_to_pixel(points[i]);