summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBen Boeckel <MathStuf@gmail.com>2009-04-22 00:24:46 -0400
committerBen Boeckel <MathStuf@gmail.com>2009-04-22 00:24:46 -0400
commitf40e0caddde825c8a61baa88515e1dec984b9fcc (patch)
tree3241a9df4ece86cab9a731d0492203221ebdbd25
parentd91529f4ec3305ad41d142fa6dcd9351fd13b0c1 (diff)
downloadsigen-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.cpp6
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);