Sat, 17 May 2014 20:33:27 +0300
- don't crash when inverting conditional lines
src/ldObject.cc | file | annotate | diff | comparison | revisions |
--- a/src/ldObject.cc Sat May 17 15:45:56 2014 +0300 +++ b/src/ldObject.cc Sat May 17 20:33:27 2014 +0300 @@ -667,16 +667,21 @@ // void LDLine::invert() { - // For lines, we swap the vertices. I don't think that a - // cond-line's control points need to be swapped, do they? + // For lines, we swap the vertices. Vertex tmp = vertex (0); setVertex (0, vertex (1)); setVertex (1, tmp); } +// ============================================================================= +// void LDCondLine::invert() { - static_cast<LDLine*> (this)->invert(); + // I don't think that a conditional line's control points need to be + // swapped, do they? + Vertex tmp = vertex (0); + setVertex (0, vertex (1)); + setVertex (1, tmp); } void LDVertex::invert() {}