Merge pull request #19664 from Gymnasiast/fix/19652

Fix #19652: remove_unused_objects removes scenery groups
This commit is contained in:
Matthias Moninger 2023-03-19 13:12:42 +02:00 committed by GitHub
commit a982d152ec
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 0 deletions

View File

@ -679,6 +679,10 @@ int32_t EditorRemoveUnusedObjects()
if (objectType == ObjectType::ParkEntrance || objectType == ObjectType::Water)
continue;
// Its hard to determine exactly if a scenery group is used, so do not remove these automatically.
if (objectType == ObjectType::SceneryGroup)
continue;
_numSelectedObjectsForType[EnumValue(objectType)]--;
_objectSelectionFlags[i] &= ~ObjectSelectionFlags::Selected;
numUnselectedObjects++;