From 3b6e28af7adaf6fb7ee1920b27a05648a7bad6bf Mon Sep 17 00:00:00 2001 From: Gabriel Diaz Date: Mon, 27 Mar 2023 17:57:38 -0300 Subject: [PATCH] fix: Open WearablePreview in the ItemEditor page --- src/components/ItemEditorPage/RightPanel/RightPanel.tsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/components/ItemEditorPage/RightPanel/RightPanel.tsx b/src/components/ItemEditorPage/RightPanel/RightPanel.tsx index 03b8407a4f..2323a4ee2a 100644 --- a/src/components/ItemEditorPage/RightPanel/RightPanel.tsx +++ b/src/components/ItemEditorPage/RightPanel/RightPanel.tsx @@ -18,7 +18,8 @@ import { isOwner, resizeImage, getEmoteCategories, - getEmotePlayModes + getEmotePlayModes, + isModelCategory } from 'modules/item/utils' import { isLocked } from 'modules/collection/utils' import { computeHashes } from 'modules/deployment/contentUtils' @@ -231,7 +232,7 @@ export default class RightPanel extends React.PureComponent { handleOpenThumbnailDialog = () => { const { selectedItem, onOpenModal } = this.props - if (selectedItem?.type === ItemType.EMOTE) { + if (selectedItem?.type === ItemType.EMOTE || (selectedItem?.data.category && isModelCategory(selectedItem.data.category))) { onOpenModal('EditThumbnailModal', { onSaveThumbnail: this.handleEmoteThumbnailChange, item: selectedItem }) } else if (this.thumbnailInput.current) { this.thumbnailInput.current.click()