summaryrefslogtreecommitdiffstats
path: root/src/sp-clippath.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/sp-clippath.cpp')
-rw-r--r--src/sp-clippath.cpp14
1 files changed, 10 insertions, 4 deletions
diff --git a/src/sp-clippath.cpp b/src/sp-clippath.cpp
index 3263bbb58..ff12f9678 100644
--- a/src/sp-clippath.cpp
+++ b/src/sp-clippath.cpp
@@ -40,7 +40,7 @@ struct SPClipPathView {
static SPClipPathView* sp_clippath_view_new_prepend(SPClipPathView *list, unsigned int key, Inkscape::DrawingItem *arenaitem);
static SPClipPathView* sp_clippath_view_list_remove(SPClipPathView *list, SPClipPathView *view);
-G_DEFINE_TYPE(SPClipPath, sp_clippath, SP_TYPE_OBJECTGROUP);
+G_DEFINE_TYPE(SPClipPath, sp_clippath, G_TYPE_OBJECT);
static void
sp_clippath_class_init(SPClipPathClass *klass)
@@ -54,9 +54,9 @@ CClipPath::CClipPath(SPClipPath* clippath) : CObjectGroup(clippath) {
CClipPath::~CClipPath() {
}
-static void
-sp_clippath_init(SPClipPath *cp)
-{
+SPClipPath::SPClipPath() : SPObjectGroup() {
+ SPClipPath* cp = this;
+
cp->cclippath = new CClipPath(cp);
cp->typeHierarchy.insert(typeid(SPClipPath));
@@ -70,6 +70,12 @@ sp_clippath_init(SPClipPath *cp)
cp->display = NULL;
}
+static void
+sp_clippath_init(SPClipPath *cp)
+{
+ new (cp) SPClipPath();
+}
+
void CClipPath::build(SPDocument* doc, Inkscape::XML::Node* repr) {
SPClipPath* object = this->spclippath;