diff --git a/src/containers/costume-library.jsx b/src/containers/costume-library.jsx index 070c9f4b9421365aa2f308ea2c96b68818fcc4cf..aafe18bc39b8cc5eca0dc6bdad64807fe1ad5f0f 100644 --- a/src/containers/costume-library.jsx +++ b/src/containers/costume-library.jsx @@ -37,7 +37,7 @@ class CostumeLibrary extends React.PureComponent { bitmapResolution: item.info.length > 2 ? item.info[2] : 1, skinId: null }; - this.props.vm.addCostume(item.md5, vmCostume); + this.props.vm.addCostumeFromLibrary(item.md5, vmCostume); analytics.event({ category: 'library', action: 'Select Costume', diff --git a/src/containers/costume-tab.jsx b/src/containers/costume-tab.jsx index 321c25c9ad14a54a4f9f3bb0249d63f7ad3f2c85..5df459150509e96d746bf03aec3fd1671fa6ee6a 100644 --- a/src/containers/costume-tab.jsx +++ b/src/containers/costume-tab.jsx @@ -150,8 +150,12 @@ class CostumeTab extends React.Component { handleDuplicateCostume (costumeIndex) { this.props.vm.duplicateCostume(costumeIndex); } - handleNewCostume (costume) { - this.props.vm.addCostume(costume.md5, costume); + handleNewCostume (costume, fromCostumeLibrary) { + if (fromCostumeLibrary) { + this.props.vm.addCostumeFromLibrary(costume.md5, costume); + } else { + this.props.vm.addCostume(costume.md5, costume); + } } handleNewBlankCostume () { const name = this.props.vm.editingTarget.isStage ? @@ -173,7 +177,7 @@ class CostumeTab extends React.Component { bitmapResolution: item.info.length > 2 ? item.info[2] : 1, skinId: null }; - this.handleNewCostume(vmCostume); + this.handleNewCostume(vmCostume, true /* fromCostumeLibrary */); } handleSurpriseBackdrop () { const item = backdropLibraryContent[Math.floor(Math.random() * backdropLibraryContent.length)];