File tree Expand file tree Collapse file tree
lib/js/src/manager/screen/utils Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -369,18 +369,36 @@ class SoftButtonObject {
369369 if ( states [ index ] . getSoftButton ( ) . getText ( ) !== otherStates [ index ] . getSoftButton ( ) . getText ( ) ) {
370370 return false ;
371371 }
372- if ( states [ index ] . getSoftButton ( ) . getImage ( ) !== otherStates [ index ] . getSoftButton ( ) . getImage ( ) ) {
372+ if ( ( states [ index ] . getSoftButton ( ) . getImage ( ) === null && otherStates [ index ] . getSoftButton ( ) . getImage ( ) !== null ) ||
373+ ( states [ index ] . getSoftButton ( ) . getImage ( ) !== null && otherStates [ index ] . getSoftButton ( ) . getImage ( ) === null ) ) {
373374 return false ;
374375 }
376+ if ( states [ index ] . getSoftButton ( ) . getImage ( ) !== null && otherStates [ index ] . getSoftButton ( ) . getImage ( ) !== null ) {
377+ if ( states [ index ] . getSoftButton ( ) . getImage ( ) . getValueParam ( ) !== otherStates [ index ] . getSoftButton ( ) . getImage ( ) . getValueParam ( ) ) {
378+ return false ;
379+ }
380+ if ( states [ index ] . getSoftButton ( ) . getImage ( ) . getImageType ( ) !== otherStates [ index ] . getSoftButton ( ) . getImage ( ) . getImageType ( ) ) {
381+ return false ;
382+ }
383+ if ( states [ index ] . getSoftButton ( ) . getImage ( ) . getIsTemplate ( ) !== otherStates [ index ] . getSoftButton ( ) . getImage ( ) . getIsTemplate ( ) ) {
384+ return false ;
385+ }
386+ }
375387 if ( states [ index ] . getSoftButton ( ) . getSoftButtonID ( ) !== otherStates [ index ] . getSoftButton ( ) . getSoftButtonID ( ) ) {
376388 return false ;
377389 }
378- // The SdlFile equals() method checks most but not all of the SdlArtwork fields
379- if ( states [ index ] . getArtwork ( ) . equals ( otherStates [ index ] . getArtwork ( ) ) ) {
390+ if ( ( states [ index ] . getArtwork ( ) === null && otherStates [ index ] . getArtwork ( ) !== null ) ||
391+ ( states [ index ] . getArtwork ( ) !== null && otherStates [ index ] . getArtwork ( ) === null ) ) {
380392 return false ;
381393 }
382- if ( states [ index ] . getArtwork ( ) . isTemplateImage ( ) !== otherStates [ index ] . getArtwork ( ) . isTemplateImage ( ) ) {
383- return false ;
394+ if ( states [ index ] . getArtwork ( ) !== null && otherStates [ index ] . getArtwork ( ) !== null ) {
395+ // The SdlFile equals() method checks most but not all of the SdlArtwork fields
396+ if ( ! states [ index ] . getArtwork ( ) . equals ( otherStates [ index ] . getArtwork ( ) ) ) {
397+ return false ;
398+ }
399+ if ( states [ index ] . getArtwork ( ) . isTemplateImage ( ) !== otherStates [ index ] . getArtwork ( ) . isTemplateImage ( ) ) {
400+ return false ;
401+ }
384402 }
385403 }
386404 }
You can’t perform that action at this time.
0 commit comments