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.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/gui/widgets/icon.cpp b/src/gui/widgets/icon.cpp
index eaf5be1c..5becadd1 100644
--- a/src/gui/widgets/icon.cpp
+++ b/src/gui/widgets/icon.cpp
@@ -31,10 +31,8 @@ Icon::Icon(const std::string &file)
{}
Icon::Icon(Image *image)
- : mImage(image)
{
- if (mImage)
- setSize(mImage->getWidth(), mImage->getHeight());
+ setImage(image);
}
void Icon::setImage(Image *image)