* Closes the window. * @param action Pointer to an action. */
| 315 | * @param action Pointer to an action. |
| 316 | */ |
| 317 | void GeoscapeCraftState::btnCancelClick(Action *) |
| 318 | { |
| 319 | // Go to the last known UFO position |
| 320 | if (_waypoint != 0) |
| 321 | { |
| 322 | _waypoint->setId(_game->getSavedGame()->getId("STR_WAYPOINT")); |
| 323 | _game->getSavedGame()->getWaypoints()->push_back(_waypoint); |
| 324 | _craft->setDestination(_waypoint); |
| 325 | } |
| 326 | // Cancel |
| 327 | _game->popState(); |
| 328 | } |
| 329 | |
| 330 | } |
nothing calls this directly
no test coverage detected