From e9df7310db33ed1217ddc6ece9d4d136a57425ca Mon Sep 17 00:00:00 2001 From: Ted John Date: Sat, 16 Jul 2016 17:57:58 +0100 Subject: [PATCH] Add missing object type check for scenery ORIs --- src/windows/editor_object_selection.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/windows/editor_object_selection.c b/src/windows/editor_object_selection.c index e0231e016e..ef6a0833a2 100644 --- a/src/windows/editor_object_selection.c +++ b/src/windows/editor_object_selection.c @@ -1591,13 +1591,13 @@ static int window_editor_object_selection_select_object(uint8 bh, int flags, con return 0; } - if (flags & (1 << 2)) { + uint8 objectType = item->ObjectEntry.flags & 0xF; + if (objectType == OBJECT_TYPE_SCENERY_SETS && (flags & (1 << 2))) { for (int j = 0; j < item->NumThemeObjects; j++) { window_editor_object_selection_select_object(++bh, flags, &item->ThemeObjects[j]); } } - uint8 objectType = item->ObjectEntry.flags & 0xF; _numSelectedObjectsForType[objectType]--; *selectionFlags &= ~OBJECT_SELECTION_FLAG_SELECTED; return 1;