--- a/src/model.cpp Thu Feb 09 20:07:45 2017 +0200 +++ b/src/model.cpp Thu Feb 09 20:44:36 2017 +0200 @@ -21,6 +21,7 @@ #include "documentmanager.h" Model::Model(DocumentManager* manager) : + QObject {manager}, _manager {manager} {} Model::~Model() @@ -65,6 +66,7 @@ _objects.insert(position, object); _needsTriangleRecount = true; object->setDocument(this); + emit objectAdded(object); } /* @@ -248,6 +250,7 @@ LDObject* Model::withdrawAt(int position) { LDObject* object = _objects[position]; + emit aboutToRemoveObject(object); _objects.removeAt(position); _needsTriangleRecount = true; return object;