summaryrefslogtreecommitdiff
path: root/src/gui/widgets/icon.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/widgets/icon.cpp')
-rw-r--r--src/gui/widgets/icon.cpp8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/gui/widgets/icon.cpp b/src/gui/widgets/icon.cpp
index 5d7d62f7..eaf5be1c 100644
--- a/src/gui/widgets/icon.cpp
+++ b/src/gui/widgets/icon.cpp
@@ -27,12 +27,8 @@
#include "resources/resourcemanager.h"
Icon::Icon(const std::string &file)
- : mImage(nullptr)
-{
- mImage = ResourceManager::getInstance()->getImage(file);
- if (mImage)
- setSize(mImage->getWidth(), mImage->getHeight());
-}
+ : Icon(ResourceManager::getInstance()->getImage(file))
+{}
Icon::Icon(Image *image)
: mImage(image)