summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorRick Pasetto <rick@lindenlab.com>2010-01-21 11:32:36 -0800
committerRick Pasetto <rick@lindenlab.com>2010-01-21 11:32:36 -0800
commit24c8ed10470b1fe6cc58ba5b2e07a34a183cb1c6 (patch)
treebad76edcf0c069247b4c41457b8a8165eb665201 /indra
parent2c0418dfe0a3e903210516a70fd947870c340bf8 (diff)
parentaf89e86029c3851d1ab11c7f43dce49bf0c70156 (diff)
Automated merge with ssh://rick@hg.lindenlab.com/viewer/viewer-2-0/
Diffstat (limited to 'indra')
-rw-r--r--indra/newview/llpanelface.cpp40
1 files changed, 30 insertions, 10 deletions
diff --git a/indra/newview/llpanelface.cpp b/indra/newview/llpanelface.cpp
index ee0426c7df..8c5208678e 100644
--- a/indra/newview/llpanelface.cpp
+++ b/indra/newview/llpanelface.cpp
@@ -65,6 +65,7 @@
#include "llvovolume.h"
#include "lluictrlfactory.h"
#include "llpluginclassmedia.h"
+#include "llviewertexturelist.h"
//
// Methods
@@ -406,14 +407,40 @@ void LLPanelFace::getState()
LLUUID id;
struct f1 : public LLSelectedTEGetFunctor<LLUUID>
{
- LLUUID get(LLViewerObject* object, S32 te)
+ LLUUID get(LLViewerObject* object, S32 te_index)
{
- LLViewerTexture* image = object->getTEImage(te);
- return image ? image->getID() : LLUUID::null;
+ LLUUID id;
+
+ LLViewerTexture* image = object->getTEImage(te_index);
+ if (image) id = image->getID();
+
+ if (!id.isNull() && LLViewerMedia::textureHasMedia(id))
+ {
+ LLTextureEntry *te = object->getTE(te_index);
+ if (te)
+ {
+ LLViewerTexture* tex = te->getID().notNull() ? gTextureList.findImage(te->getID()) : NULL ;
+ if(!tex)
+ {
+ tex = LLViewerFetchedTexture::sDefaultImagep;
+ }
+ if (tex)
+ {
+ id = tex->getID();
+ }
+ }
+ }
+ return id;
}
} func;
identical = LLSelectMgr::getInstance()->getSelection()->getSelectedTEValue( &func, id );
+ if(LLViewerMedia::textureHasMedia(id))
+ {
+ childSetEnabled("textbox autofix",editable);
+ childSetEnabled("button align",editable);
+ }
+
if (identical)
{
// All selected have the same texture
@@ -444,13 +471,6 @@ void LLPanelFace::getState()
}
}
}
-
- if(LLViewerMedia::textureHasMedia(id))
- {
- childSetEnabled("textbox autofix",editable);
- childSetEnabled("button align",editable);
- }
-
}