From 1a96dd0bd531ac2bb3cdacd1d2caa9f55f4bea2b Mon Sep 17 00:00:00 2001 From: scrawl Date: Wed, 27 Aug 2014 16:39:13 +0200 Subject: [PATCH] Remove more MyGUI 3.2.0 specific code --- apps/openmw/mwgui/itemwidget.cpp | 31 ++----------------------------- apps/openmw/mwgui/itemwidget.hpp | 3 --- 2 files changed, 2 insertions(+), 32 deletions(-) diff --git a/apps/openmw/mwgui/itemwidget.cpp b/apps/openmw/mwgui/itemwidget.cpp index 3e109384b6..ade8f5731a 100644 --- a/apps/openmw/mwgui/itemwidget.cpp +++ b/apps/openmw/mwgui/itemwidget.cpp @@ -35,26 +35,12 @@ namespace MWGui void ItemWidget::setIcon(const std::string &icon) { - // HACK HACK HACK: Don't setImageTexture if it hasn't changed. - // There is a leak in MyGUI for each setImageTexture on the same widget. - // http://www.ogre3d.org/addonforums/viewtopic.php?f=17&t=30251 - if (mCurrentItemTexture == icon) - return; - - mCurrentItemTexture = icon; if (mItem) mItem->setImageTexture(icon); } void ItemWidget::setFrame(const std::string &frame, const MyGUI::IntCoord &coord) { - // HACK HACK HACK: Don't setImageTexture if it hasn't changed. - // There is a leak in MyGUI for each setImageTexture on the same widget. - // http://www.ogre3d.org/addonforums/viewtopic.php?f=17&t=30251 - if (mCurrentFrameTexture == frame) - return; - - mCurrentFrameTexture = frame; if (mFrame) { mFrame->setImageTexture(frame); @@ -77,21 +63,8 @@ namespace MWGui if (ptr.isEmpty()) { if (mFrame) - { - // HACK HACK HACK: Don't setImageTexture if it hasn't changed. - // There is a leak in MyGUI for each setImageTexture on the same widget. - // http://www.ogre3d.org/addonforums/viewtopic.php?f=17&t=30251 - if (!mCurrentFrameTexture.empty()) - { - mFrame->setImageTexture(""); - mCurrentFrameTexture = ""; - } - } - if (!mCurrentItemTexture.empty()) - { - mCurrentItemTexture = ""; - mItem->setImageTexture(""); - } + mFrame->setImageTexture(""); + mItem->setImageTexture(""); return; } diff --git a/apps/openmw/mwgui/itemwidget.hpp b/apps/openmw/mwgui/itemwidget.hpp index 5cdf712126..3de98489d0 100644 --- a/apps/openmw/mwgui/itemwidget.hpp +++ b/apps/openmw/mwgui/itemwidget.hpp @@ -42,9 +42,6 @@ namespace MWGui MyGUI::ImageBox* mItem; MyGUI::ImageBox* mFrame; - - std::string mCurrentItemTexture; - std::string mCurrentFrameTexture; }; }