src/model.cpp

changeset 1113
5f3139c802bf
parent 1100
9b2797729c82
child 1117
efcb47c64a72
--- 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;

mercurial