summaryrefslogtreecommitdiff
path: root/indra/newview/llfloateravatartextures.cpp
diff options
context:
space:
mode:
authorSteven Bennetts <steve@lindenlab.com>2009-06-21 08:04:56 +0000
committerSteven Bennetts <steve@lindenlab.com>2009-06-21 08:04:56 +0000
commit9ec432034dc3c45d7ce763eb02dae4cc7f6b8da8 (patch)
tree4a505c1e0919af52800b3ffb3eaf135e7d6f9ce6 /indra/newview/llfloateravatartextures.cpp
parent351ebe9fcb76f3b99c2957004bb8493a904869ee (diff)
merge -r 122421-124917 viewer-2.0.0-2 -> viewer-2.0.0-3
ignore-dead-branch
Diffstat (limited to 'indra/newview/llfloateravatartextures.cpp')
-rw-r--r--indra/newview/llfloateravatartextures.cpp29
1 files changed, 14 insertions, 15 deletions
diff --git a/indra/newview/llfloateravatartextures.cpp b/indra/newview/llfloateravatartextures.cpp
index e81b5d7fce..e2f13088eb 100644
--- a/indra/newview/llfloateravatartextures.cpp
+++ b/indra/newview/llfloateravatartextures.cpp
@@ -42,30 +42,29 @@
using namespace LLVOAvatarDefines;
-LLFloaterAvatarTextures::LLFloaterAvatarTextures(const LLUUID& id) :
- LLFloater(std::string("avatar_texture_debug")),
+LLFloaterAvatarTextures* LLFloaterAvatarTextures::sInstance = NULL;
+LLFloaterAvatarTextures::LLFloaterAvatarTextures(const LLUUID& id)
+ : LLFloater(),
mID(id)
{
+ LLUICtrlFactory::getInstance()->buildFloater(this, "floater_avatar_textures.xml");
}
LLFloaterAvatarTextures::~LLFloaterAvatarTextures()
{
+ sInstance = NULL;
}
LLFloaterAvatarTextures* LLFloaterAvatarTextures::show(const LLUUID &id)
{
-
- LLFloaterAvatarTextures* floaterp = new LLFloaterAvatarTextures(id);
-
- // Builds and adds to gFloaterView
- LLUICtrlFactory::getInstance()->buildFloater(floaterp, "floater_avatar_textures.xml");
-
- gFloaterView->addChild(floaterp);
- floaterp->open(); /*Flawfinder: ignore*/
-
- gFloaterView->adjustToFitScreen(floaterp, FALSE);
-
- return floaterp;
+ if (!sInstance)
+ {
+ sInstance = new LLFloaterAvatarTextures(id);
+ gFloaterView->addChild(sInstance);
+ gFloaterView->adjustToFitScreen(sInstance, FALSE);
+ }
+ sInstance->openFloater();
+ return sInstance;
}
BOOL LLFloaterAvatarTextures::postBuild()
@@ -142,7 +141,7 @@ void LLFloaterAvatarTextures::refresh()
}
else
{
- setTitle(mTitle + ": INVALID AVATAR (" + mID.asString() + ")");
+ setTitle(mTitle + ": " + getString("InvalidAvatar") + " (" + mID.asString() + ")");
}
}