256 int ForgeWindow::deleteSelection() |
256 int ForgeWindow::deleteSelection() |
257 { if (selection().isEmpty()) |
257 { if (selection().isEmpty()) |
258 return 0; |
258 return 0; |
259 |
259 |
260 QList<LDObject*> selCopy = selection(); |
260 QList<LDObject*> selCopy = selection(); |
261 int num = 0; |
|
262 |
261 |
263 // Delete the objects that were being selected |
262 // Delete the objects that were being selected |
264 for (LDObject* obj : selCopy) |
263 for (LDObject* obj : selCopy) |
265 { LDFile::current()->forgetObject (obj); |
|
266 ++num; |
|
267 delete obj; |
264 delete obj; |
268 } |
|
269 |
265 |
270 refresh(); |
266 refresh(); |
271 return num; |
267 return selCopy.size(); |
272 } |
268 } |
273 |
269 |
274 // ============================================================================= |
270 // ============================================================================= |
275 // ----------------------------------------------------------------------------- |
271 // ----------------------------------------------------------------------------- |
276 void ForgeWindow::buildObjList() |
272 void ForgeWindow::buildObjList() |