diff options
author | Andrei Karas <akaras@inbox.ru> | 2012-07-23 00:10:43 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2012-07-23 00:10:43 +0300 |
commit | d97189f055798b5b2051c1c5770a3def62747461 (patch) | |
tree | d66a891dba33d2ce1c882e0de7d6145bb2e0326b /src/gui/widgets/itemcontainer.cpp | |
parent | 25dce1399e40f24809842303d48ef090439de1e5 (diff) | |
download | manaplus-d97189f055798b5b2051c1c5770a3def62747461.tar.gz manaplus-d97189f055798b5b2051c1c5770a3def62747461.tar.bz2 manaplus-d97189f055798b5b2051c1c5770a3def62747461.tar.xz manaplus-d97189f055798b5b2051c1c5770a3def62747461.zip |
Improve perfomance in some object constructors.
Diffstat (limited to 'src/gui/widgets/itemcontainer.cpp')
-rw-r--r-- | src/gui/widgets/itemcontainer.cpp | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/src/gui/widgets/itemcontainer.cpp b/src/gui/widgets/itemcontainer.cpp index c5118ce44..6963bad31 100644 --- a/src/gui/widgets/itemcontainer.cpp +++ b/src/gui/widgets/itemcontainer.cpp @@ -157,6 +157,7 @@ ItemContainer::ItemContainer(Inventory *inventory, bool forceQuantity): mInventory(inventory), mGridColumns(1), mGridRows(1), + mSelImg(Theme::getImageFromThemeXml("item_selection.xml")), mSelectedIndex(-1), mHighlightedIndex(-1), mLastUsedSlot(-1), @@ -173,11 +174,6 @@ ItemContainer::ItemContainer(Inventory *inventory, bool forceQuantity): mUnEquipedColor(Theme::getThemeColor(Theme::ITEM_NOT_EQUIPPED)) { setFocusable(true); - - mSelImg = Theme::getImageFromThemeXml("item_selection.xml"); - if (!mSelImg) - logger->log1("Error: Unable to load selection.png"); - addKeyListener(this); addMouseListener(this); addWidgetListener(this); |