free all map elements, reinitialize the structures that depend on them
| 472 | |
| 473 | // free all map elements, reinitialize the structures that depend on them |
| 474 | void Map::freeMap() |
| 475 | { |
| 476 | // Abort any ongoing merge |
| 477 | abortMergeOperation(); |
| 478 | |
| 479 | // Fire the map unloading event, |
| 480 | // This will de-select stuff, clear the pointfile, etc. |
| 481 | emitMapEvent(MapUnloading); |
| 482 | |
| 483 | setWorldspawn(scene::INodePtr()); |
| 484 | |
| 485 | GlobalSceneGraph().setRoot(scene::IMapRootNodePtr()); |
| 486 | |
| 487 | emitMapEvent(MapUnloaded); |
| 488 | |
| 489 | // Reset the resource pointer |
| 490 | _modifiedStatusListener.disconnect(); |
| 491 | _resource.reset(); |
| 492 | } |
| 493 | |
| 494 | bool Map::isModified() const |
| 495 | { |
no test coverage detected