diff options
| author | Ben Boeckel <MathStuf@gmail.com> | 2009-04-22 00:24:46 -0400 |
|---|---|---|
| committer | Ben Boeckel <MathStuf@gmail.com> | 2009-04-22 00:24:46 -0400 |
| commit | f40e0caddde825c8a61baa88515e1dec984b9fcc (patch) | |
| tree | 3241a9df4ece86cab9a731d0492203221ebdbd25 | |
| parent | d91529f4ec3305ad41d142fa6dcd9351fd13b0c1 (diff) | |
| download | sigen-f40e0caddde825c8a61baa88515e1dec984b9fcc.tar.gz sigen-f40e0caddde825c8a61baa88515e1dec984b9fcc.tar.xz sigen-f40e0caddde825c8a61baa88515e1dec984b9fcc.zip | |
Initialize THe points vector if it's a Poly*
| -rw-r--r-- | sigmodr/widgets/mapeditor/ShapeItem.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
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); |
