266 LDObject::~LDObject() |
266 LDObject::~LDObject() |
267 { // If this object was selected, unselect it now |
267 { // If this object was selected, unselect it now |
268 if (selected()) |
268 if (selected()) |
269 unselect(); |
269 unselect(); |
270 |
270 |
|
271 // If this object was associated to a file, remove it off it now |
|
272 if (file()) |
|
273 file()->forgetObject (this); |
|
274 |
271 // Delete the GL lists |
275 // Delete the GL lists |
272 GL::deleteLists (this); |
276 GL::deleteLists (this); |
273 |
277 |
274 // Remove this object from the list of LDObjects |
278 // Remove this object from the list of LDObjects |
275 g_LDObjects.removeOne (this); |
279 g_LDObjects.removeOne (this); |