diff --git a/Polyhedron/demo/Polyhedron/Scene_item.cpp b/Polyhedron/demo/Polyhedron/Scene_item.cpp index cd1e4157e41..8e8e7b2a9ad 100644 --- a/Polyhedron/demo/Polyhedron/Scene_item.cpp +++ b/Polyhedron/demo/Polyhedron/Scene_item.cpp @@ -4,6 +4,11 @@ const QColor Scene_item::defaultColor = QColor(100, 100, 255); Scene_item::~Scene_item() {} +void Scene_item::itemAboutToBeDestroyed(Scene_item* item) { + if(this == item) + emit aboutToBeDestroyed(); +} + // Rendering mode as a human readable string QString Scene_item::renderingModeName() const { diff --git a/Polyhedron/demo/Polyhedron/Scene_item.h b/Polyhedron/demo/Polyhedron/Scene_item.h index a294e8edaa5..ac2b64f2192 100644 --- a/Polyhedron/demo/Polyhedron/Scene_item.h +++ b/Polyhedron/demo/Polyhedron/Scene_item.h @@ -76,6 +76,11 @@ public slots: rendering_mode = m; } + virtual void itemAboutToBeDestroyed(Scene_item*); + +signals: + void aboutToBeDestroyed(); + protected: // The four basic properties QString name_;