src/gui.cpp

changeset 528
e38d199ef9aa
parent 526
b29b6fc45ba9
child 530
f9476dbd87ec
equal deleted inserted replaced
527:47c068f2e7e3 528:e38d199ef9aa
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()

mercurial