From ca252f9f02e9e914ecb526f3e68e94890332901f Mon Sep 17 00:00:00 2001 From: David Capello Date: Fri, 5 Nov 2021 12:15:24 -0300 Subject: [PATCH] Fix creating two ImageView if we specify "file" and "icon" for widget --- src/app/widget_loader.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/app/widget_loader.cpp b/src/app/widget_loader.cpp index efbb34c4a..54dd57f61 100644 --- a/src/app/widget_loader.cpp +++ b/src/app/widget_loader.cpp @@ -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);