src/model.cpp

changeset 1261
5d2c9d36da9d
parent 1258
f5921a474d57
child 1263
0256edecda54
equal deleted inserted replaced
1260:0347e9bc883e 1261:5d2c9d36da9d
63 /* 63 /*
64 * Takes an existing object and migrates it to this model, at the specified position. 64 * Takes an existing object and migrates it to this model, at the specified position.
65 */ 65 */
66 void Model::insertObject(int position, LDObject* object) 66 void Model::insertObject(int position, LDObject* object)
67 { 67 {
68 connect(object, SIGNAL(codeChanged(QString,QString)), this, SLOT(recountTriangles()));
69
68 if (object->model() and object->model() != this) 70 if (object->model() and object->model() != this)
69 object->model()->withdraw(object); 71 object->model()->withdraw(object);
70 72
71 // TODO: check that the object isn't in the vector once there's a cheap way to do so! 73 // TODO: check that the object isn't in the vector once there's a cheap way to do so!
72 beginInsertRows({}, position, position); 74 beginInsertRows({}, position, position);

mercurial