summaryrefslogtreecommitdiffstats
path: root/src/sp-object.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/sp-object.h')
-rw-r--r--src/sp-object.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/sp-object.h b/src/sp-object.h
index d513e878a..2d3b412c9 100644
--- a/src/sp-object.h
+++ b/src/sp-object.h
@@ -20,7 +20,8 @@ class SPObjectClass;
#define SP_TYPE_OBJECT (sp_object_get_type())
#define SP_OBJECT(obj) ((SPObject*)obj)
-#define SP_IS_OBJECT(obj) (obj != NULL && static_cast<const SPObject*>(obj)->typeHierarchy.count(typeid(SPObject)))
+//#define SP_IS_OBJECT(obj) (obj != NULL && static_cast<const SPObject*>(obj)->typeHierarchy.count(typeid(SPObject)))
+#define SP_IS_OBJECT(obj) (dynamic_cast<const SPObject*>((SPObject*)obj))
/* Async modification flags */
#define SP_OBJECT_MODIFIED_FLAG (1 << 0)
@@ -190,7 +191,7 @@ class CObject;
* provides document level functionality such as the undo stack,
* dictionary and so on. Source: doc/architecture.txt
*/
-class SPObject : public GObject {
+class SPObject { // : public GObject {
public:
enum CollectionPolicy {
COLLECT_WITH_PARENT,
@@ -198,6 +199,8 @@ public:
};
SPObject();
+ virtual ~SPObject();
+
CObject* cobject;
std::set<TypeInfo> typeHierarchy;