@@ -118,7 +118,7 @@ static void transferCellListenersFromCells(List<MenuCell> fromCells, List<MenuCe
118118 }
119119 }
120120
121- static Set <SdlArtwork > findAllArtworksToBeUploadedFromCells (List <MenuCell > cells , FileManager fileManager , WindowCapability windowCapability ) {
121+ static Set <SdlArtwork > findAllArtworksToBeUploadedFromCells (ISdl internalInterface , List <MenuCell > cells , FileManager fileManager , WindowCapability windowCapability ) {
122122 // Make sure we can use images in the menus
123123 if (!hasImageFieldOfName (windowCapability , ImageFieldName .cmdIcon )) {
124124 return new HashSet <>();
@@ -127,15 +127,15 @@ static Set<SdlArtwork> findAllArtworksToBeUploadedFromCells(List<MenuCell> cells
127127 Set <SdlArtwork > artworks = new HashSet <>();
128128 for (MenuCell cell : cells ) {
129129 if (fileManager != null ) {
130- if (fileManager .fileNeedsUpload (cell .getIcon ())) {
130+ if (windowCapabilitySupportsPrimaryImage ( internalInterface , windowCapability , cell ) && fileManager .fileNeedsUpload (cell .getIcon ())) {
131131 artworks .add (cell .getIcon ());
132132 }
133- if (hasImageFieldOfName (windowCapability , ImageFieldName . menuCommandSecondaryImage ) && fileManager .fileNeedsUpload (cell .getSecondaryArtwork ())) {
133+ if (windowCapabilitySupportsSecondaryImage (windowCapability , cell ) && fileManager .fileNeedsUpload (cell .getSecondaryArtwork ())) {
134134 artworks .add (cell .getSecondaryArtwork ());
135135 }
136136 }
137137 if (cell .isSubMenuCell () && !cell .getSubCells ().isEmpty ()) {
138- artworks .addAll (findAllArtworksToBeUploadedFromCells (cell .getSubCells (), fileManager , windowCapability ));
138+ artworks .addAll (findAllArtworksToBeUploadedFromCells (internalInterface , cell .getSubCells (), fileManager , windowCapability ));
139139 }
140140 }
141141
0 commit comments