File tree Expand file tree Collapse file tree 2 files changed +8
-4
lines changed Expand file tree Collapse file tree 2 files changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -37,7 +37,7 @@ class CostumeLibrary extends React.PureComponent {
3737 bitmapResolution : item . info . length > 2 ? item . info [ 2 ] : 1 ,
3838 skinId : null
3939 } ;
40- this . props . vm . addCostume ( item . md5 , vmCostume ) ;
40+ this . props . vm . addCostumeFromLibrary ( item . md5 , vmCostume ) ;
4141 analytics . event ( {
4242 category : 'library' ,
4343 action : 'Select Costume' ,
Original file line number Diff line number Diff line change @@ -150,8 +150,12 @@ class CostumeTab extends React.Component {
150150 handleDuplicateCostume ( costumeIndex ) {
151151 this . props . vm . duplicateCostume ( costumeIndex ) ;
152152 }
153- handleNewCostume ( costume ) {
154- this . props . vm . addCostume ( costume . md5 , costume ) ;
153+ handleNewCostume ( costume , fromCostumeLibrary ) {
154+ if ( fromCostumeLibrary ) {
155+ this . props . vm . addCostumeFromLibrary ( costume . md5 , costume ) ;
156+ } else {
157+ this . props . vm . addCostume ( costume . md5 , costume ) ;
158+ }
155159 }
156160 handleNewBlankCostume ( ) {
157161 const name = this . props . vm . editingTarget . isStage ?
@@ -173,7 +177,7 @@ class CostumeTab extends React.Component {
173177 bitmapResolution : item . info . length > 2 ? item . info [ 2 ] : 1 ,
174178 skinId : null
175179 } ;
176- this . handleNewCostume ( vmCostume ) ;
180+ this . handleNewCostume ( vmCostume , true /* fromCostumeLibrary */ ) ;
177181 }
178182 handleSurpriseBackdrop ( ) {
179183 const item = backdropLibraryContent [ Math . floor ( Math . random ( ) * backdropLibraryContent . length ) ] ;
You can’t perform that action at this time.
0 commit comments