Fix creating two ImageView if we specify "file" and "icon" for <image> widget

This commit is contained in:
David Capello 2021-11-05 12:15:24 -03:00
parent 43ca34bd35
commit ca252f9f02

View File

@ -506,8 +506,7 @@ Widget* WidgetLoader::convertXmlElementToWidget(const TiXmlElement* elem, Widget
throw base::Exception("Error loading %s file", file);
}
}
if (icon) {
else if (icon) {
SkinPartPtr part = SkinTheme::instance()->getPartById(std::string(icon));
if (part) {
widget = new ImageView(part->bitmapRef(0), 0);