diff options
Diffstat (limited to 'src/sp-shape.cpp')
| -rw-r--r-- | src/sp-shape.cpp | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/src/sp-shape.cpp b/src/sp-shape.cpp index 42b6ec6dd..e3c0301de 100644 --- a/src/sp-shape.cpp +++ b/src/sp-shape.cpp @@ -56,7 +56,7 @@ static void sp_shape_finalize (GObject *object); static void sp_shape_update_marker_view (SPShape *shape, Inkscape::DrawingItem *ai); -G_DEFINE_TYPE(SPShape, sp_shape, SP_TYPE_LPE_ITEM); +G_DEFINE_TYPE(SPShape, sp_shape, G_TYPE_OBJECT); /** * Initializes a SPShapeClass object. Establishes the function pointers to the class' @@ -76,12 +76,10 @@ CShape::CShape(SPShape* shape) : CLPEItem(shape) { CShape::~CShape() { } -/** - * Initializes an SPShape object. - */ -static void -sp_shape_init(SPShape *shape) -{ + +SPShape::SPShape() : SPLPEItem() { + SPShape* shape = this; + shape->cshape = new CShape(shape); shape->typeHierarchy.insert(typeid(SPShape)); @@ -99,6 +97,15 @@ sp_shape_init(SPShape *shape) shape->_curve_before_lpe = NULL; } +/** + * Initializes an SPShape object. + */ +static void +sp_shape_init(SPShape *shape) +{ + new (shape) SPShape(); +} + static void sp_shape_finalize(GObject *object) { |
