MCPcopy Create free account
hub / github.com/DescentDevelopers/Descent3 / OnDelete

Method OnDelete

editor/ObjectListDialog.cpp:400–414  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

398}
399
400void CObjectListDialog::OnDelete() {
401 int objhandle = GetObjectSelected();
402 object *obj = NULL;
403
404 if (objhandle > -1) {
405 obj = ObjGet(objhandle);
406 }
407
408 if (obj) {
409 CTreeCtrl *tree = (CTreeCtrl *)GetDlgItem(IDC_OBJTREE);
410 Cur_object_index = OBJNUM(obj);
411 HObjectDelete();
412 tree->DeleteItem(tree->GetSelectedItem());
413 }
414}
415
416void CObjectListDialog::OnClear() {
417 // delete all items.

Callers

nothing calls this directly

Calls 4

ObjGetFunction · 0.85
HObjectDeleteFunction · 0.85
DeleteItemMethod · 0.80
GetSelectedItemMethod · 0.45

Tested by

no test coverage detected