From f7e1b0942c8d7b321d66a51c94dff04099950716 Mon Sep 17 00:00:00 2001 From: Roman Telezhynskyi Date: Mon, 9 Apr 2018 11:12:46 +0300 Subject: [PATCH] Fixed issue #837. Valentina crashes when changing seam allowance on a curve segment. I made a mistake switching to C++11 range-based loops here. --HG-- branch : develop --- src/libs/vpatterndb/vpiecepath.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/libs/vpatterndb/vpiecepath.cpp b/src/libs/vpatterndb/vpiecepath.cpp index d276c7047..4aeecac1d 100644 --- a/src/libs/vpatterndb/vpiecepath.cpp +++ b/src/libs/vpatterndb/vpiecepath.cpp @@ -995,9 +995,9 @@ QVector VPiecePath::CurveSeamAllowanceSegment(const VContainer *data, qreal w2 = end.GetSABefore(); if (w1 < 0 && w2 < 0) {// no local widths - for(auto point : points) + for(int i = 0; i < points.size(); ++i) { - VSAPoint p(point); + VSAPoint p(points.at(i)); if (i == 0) { // first point p.SetSAAfter(begin.GetSAAfter()); @@ -1036,9 +1036,9 @@ QVector VPiecePath::CurveSeamAllowanceSegment(const VContainer *data, qreal length = 0; // how much we handle - for(auto point : points) + for(int i = 1; i < points.size(); ++i) { - p = VSAPoint(point); + p = VSAPoint(points.at(i)); if (i == points.size() - 1) {// last point