| 1323 | } |
| 1324 | |
| 1325 | void CBriefEdit::OnBriefEffectDel() { |
| 1326 | UpdateData(true); |
| 1327 | int curr_screen, curr_effect; |
| 1328 | BriefEditGetCurScreenEffect(&curr_screen, &curr_effect); |
| 1329 | if (curr_screen == -1 || curr_effect == -1) { |
| 1330 | MessageBox("No Effects To Delete", "Error"); |
| 1331 | return; |
| 1332 | } |
| 1333 | |
| 1334 | if (MessageBox("Are You Sure You Want To Delete Effect?", "Confirmation", MB_YESNO) != IDYES) |
| 1335 | return; |
| 1336 | |
| 1337 | ASSERT(curr_screen >= 0 && curr_screen < MAX_TELCOM_SCREENS); |
| 1338 | ASSERT(curr_effect >= 0 && curr_effect < MAX_EFFECTS_PER_SCREEN); |
| 1339 | |
| 1340 | tBriefScreen *bscr = &Briefing_screens[curr_screen]; |
| 1341 | int prev = bscr->effects[curr_effect].prev; |
| 1342 | int next = bscr->effects[curr_effect].next; |
| 1343 | |
| 1344 | if (prev == -1) |
| 1345 | bscr->root_effect = next; |
| 1346 | else |
| 1347 | bscr->effects[prev].next = next; |
| 1348 | |
| 1349 | if (next != -1) |
| 1350 | bscr->effects[next].prev = prev; |
| 1351 | |
| 1352 | BriefEditFreeEffect(&bscr->effects[curr_effect]); |
| 1353 | CComboBox *combo = (CComboBox *)GetDlgItem(IDC_BRIEF_EFFECT_LIST); |
| 1354 | combo->DeleteString(combo->GetCurSel()); |
| 1355 | combo->SetCurSel(0); |
| 1356 | has_changed = true; |
| 1357 | UpdateData(false); |
| 1358 | } |
| 1359 | |
| 1360 | void CBriefEdit::OnBriefEffectEdit() { |
| 1361 | CComboBox *combo = (CComboBox *)GetDlgItem(IDC_BRIEF_EFFECT_LIST); |
nothing calls this directly
no test coverage detected