//////////////////////////////////////////////////////////////// TEditorClient -------------
| 3363 | // ------------- |
| 3364 | // |
| 3365 | void TEditorClient::CmMiscVAddLineDef () |
| 3366 | { |
| 3367 | // Ignore if "insert object" mode |
| 3368 | if ( InsertingObject ) |
| 3369 | return; |
| 3370 | |
| 3371 | SET_HELP_CONTEXT(Add_a_LineDef_and_split_Sector); |
| 3372 | |
| 3373 | // Check two object selected |
| 3374 | if ( CheckSelection (2, 2) == FALSE ) |
| 3375 | goto End; |
| 3376 | |
| 3377 | // UNDO |
| 3378 | StartUndoRecording("Add LineDef"); |
| 3379 | |
| 3380 | // Add LineDef and Split sector |
| 3381 | SplitSector (Selected->objnum, Selected->next->objnum); |
| 3382 | |
| 3383 | // UNDO |
| 3384 | StopUndoRecording(); |
| 3385 | |
| 3386 | // SELECTION MAY BE NOT VALID |
| 3387 | // Forget selection to prevent invalid object numbers |
| 3388 | ForgetSelection (&Selected); |
| 3389 | CurObject = -1; |
| 3390 | |
| 3391 | // Redraw map, info windows and status bar |
| 3392 | RefreshWindows(); |
| 3393 | |
| 3394 | End: |
| 3395 | RESTORE_HELP_CONTEXT(); |
| 3396 | } |
| 3397 | |
| 3398 | |
| 3399 | ///////////////////////////////////////////////////////////////////// |
nothing calls this directly
no test coverage detected