| @@ -333,12 +333,21 @@ void ProjectExporter::createIconProperties (PropertyListBuilder& props) | |||||
| choices.add ("<None>"); | choices.add ("<None>"); | ||||
| ids.add (var()); | ids.add (var()); | ||||
| for (int i = 0; i < images.size(); ++i) | |||||
| for (const auto* imageItem : images) | |||||
| { | { | ||||
| choices.add (images.getUnchecked(i)->getName()); | |||||
| ids.add (images.getUnchecked(i)->getID()); | |||||
| choices.add (imageItem->getName()); | |||||
| ids.add (imageItem->getID()); | |||||
| } | } | ||||
| const auto resetToDefaultIfFileMissing = [&ids] (ValueWithDefault& v) | |||||
| { | |||||
| if (! v.isUsingDefault() && ! ids.contains (v.get())) | |||||
| v.resetToDefault(); | |||||
| }; | |||||
| resetToDefaultIfFileMissing (smallIconValue); | |||||
| resetToDefaultIfFileMissing (bigIconValue); | |||||
| props.add (new ChoicePropertyComponent (smallIconValue, "Icon (Small)", choices, ids), | props.add (new ChoicePropertyComponent (smallIconValue, "Icon (Small)", choices, ids), | ||||
| "Sets an icon to use for the executable."); | "Sets an icon to use for the executable."); | ||||