From f40e0caddde825c8a61baa88515e1dec984b9fcc Mon Sep 17 00:00:00 2001 From: Ben Boeckel Date: Wed, 22 Apr 2009 00:24:46 -0400 Subject: Initialize THe points vector if it's a Poly* --- sigmodr/widgets/mapeditor/ShapeItem.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/sigmodr/widgets/mapeditor/ShapeItem.cpp b/sigmodr/widgets/mapeditor/ShapeItem.cpp index 45bf662a..7755c0fe 100644 --- a/sigmodr/widgets/mapeditor/ShapeItem.cpp +++ b/sigmodr/widgets/mapeditor/ShapeItem.cpp @@ -36,6 +36,12 @@ ShapeItem::ShapeItem(const Shape shape) : m_xShear(1), m_yShear(1) { + if ((m_shape == PolyLine) || (m_shape == Polygon)) + { + m_points.append(QPointF(0, 0)); + if (m_shape == Polygon) + m_points.append(QPointF(0, 0)); + } recreatePath(); setFlags(ItemIsMovable | ItemIsSelectable); setOpacity(.5); -- cgit