| 299 | } |
| 300 | |
| 301 | void Map::setMapName(const std::string& newName) |
| 302 | { |
| 303 | bool mapNameChanged = _mapName != newName; |
| 304 | |
| 305 | // Store the name into the member |
| 306 | _mapName = newName; |
| 307 | |
| 308 | // Update the map resource's root node, if there is one |
| 309 | if (_resource) |
| 310 | { |
| 311 | _resource->rename(newName); |
| 312 | } |
| 313 | |
| 314 | if (mapNameChanged) |
| 315 | { |
| 316 | // Fire the signal to any observers |
| 317 | signal_mapNameChanged().emit(); |
| 318 | } |
| 319 | } |
| 320 | |
| 321 | sigc::signal<void>& Map::signal_mapNameChanged() |
| 322 | { |
no test coverage detected