diff options
author | Jacek Antonelli | 2008-08-15 23:45:11 -0500 |
---|---|---|
committer | Jacek Antonelli | 2008-08-15 23:45:11 -0500 |
commit | 215f423cbe18fe9ca14a26caef918d303bad28ff (patch) | |
tree | 0743442b286216cc8e19aa487c26f4e9345ffd64 /linden/indra/newview/llpanelobject.cpp | |
parent | Second Life viewer sources 1.18.3.5-RC (diff) | |
download | meta-impy-215f423cbe18fe9ca14a26caef918d303bad28ff.zip meta-impy-215f423cbe18fe9ca14a26caef918d303bad28ff.tar.gz meta-impy-215f423cbe18fe9ca14a26caef918d303bad28ff.tar.bz2 meta-impy-215f423cbe18fe9ca14a26caef918d303bad28ff.tar.xz |
Second Life viewer sources 1.18.4.0-RC
Diffstat (limited to '')
-rw-r--r-- | linden/indra/newview/llpanelobject.cpp | 23 |
1 files changed, 18 insertions, 5 deletions
diff --git a/linden/indra/newview/llpanelobject.cpp b/linden/indra/newview/llpanelobject.cpp index a8411df..cf50709 100644 --- a/linden/indra/newview/llpanelobject.cpp +++ b/linden/indra/newview/llpanelobject.cpp | |||
@@ -2,6 +2,8 @@ | |||
2 | * @file llpanelobject.cpp | 2 | * @file llpanelobject.cpp |
3 | * @brief Object editing (position, scale, etc.) in the tools floater | 3 | * @brief Object editing (position, scale, etc.) in the tools floater |
4 | * | 4 | * |
5 | * $LicenseInfo:firstyear=2001&license=viewergpl$ | ||
6 | * | ||
5 | * Copyright (c) 2001-2007, Linden Research, Inc. | 7 | * Copyright (c) 2001-2007, Linden Research, Inc. |
6 | * | 8 | * |
7 | * Second Life Viewer Source Code | 9 | * Second Life Viewer Source Code |
@@ -24,6 +26,7 @@ | |||
24 | * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO | 26 | * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO |
25 | * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, | 27 | * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, |
26 | * COMPLETENESS OR PERFORMANCE. | 28 | * COMPLETENESS OR PERFORMANCE. |
29 | * $/LicenseInfo$ | ||
27 | */ | 30 | */ |
28 | 31 | ||
29 | #include "llviewerprecompiledheaders.h" | 32 | #include "llviewerprecompiledheaders.h" |
@@ -95,7 +98,7 @@ enum { | |||
95 | MI_HOLE_COUNT | 98 | MI_HOLE_COUNT |
96 | }; | 99 | }; |
97 | 100 | ||
98 | //XUI:translate (depricated, so very low priority) | 101 | //*TODO:translate (depricated, so very low priority) |
99 | static const LLString LEGACY_FULLBRIGHT_DESC("Fullbright (Legacy)"); | 102 | static const LLString LEGACY_FULLBRIGHT_DESC("Fullbright (Legacy)"); |
100 | 103 | ||
101 | BOOL LLPanelObject::postBuild() | 104 | BOOL LLPanelObject::postBuild() |
@@ -160,7 +163,7 @@ BOOL LLPanelObject::postBuild() | |||
160 | mComboMaterial = gUICtrlFactory->getComboBoxByName(this,"material"); | 163 | mComboMaterial = gUICtrlFactory->getComboBoxByName(this,"material"); |
161 | childSetCommitCallback("material",onCommitMaterial,this); | 164 | childSetCommitCallback("material",onCommitMaterial,this); |
162 | mComboMaterial->removeall(); | 165 | mComboMaterial->removeall(); |
163 | // XUI:translate | 166 | // *TODO:translate |
164 | LLMaterialInfo *minfop; | 167 | LLMaterialInfo *minfop; |
165 | for (minfop = LLMaterialTable::basic.mMaterialInfoList.getFirstData(); | 168 | for (minfop = LLMaterialTable::basic.mMaterialInfoList.getFirstData(); |
166 | minfop != NULL; | 169 | minfop != NULL; |
@@ -506,8 +509,17 @@ void LLPanelObject::getState( ) | |||
506 | #endif | 509 | #endif |
507 | 510 | ||
508 | // Update material part | 511 | // Update material part |
509 | U8 material_code; | 512 | // slightly inefficient - materials are unique per object, not per TE |
510 | BOOL material_same = gSelectMgr->selectionGetMaterial(&material_code); | 513 | U8 material_code = 0; |
514 | struct f : public LLSelectedTEGetFunctor<U8> | ||
515 | { | ||
516 | U8 get(LLViewerObject* object, S32 te) | ||
517 | { | ||
518 | return object->getMaterial(); | ||
519 | } | ||
520 | } func; | ||
521 | bool material_same = gSelectMgr->getSelection()->getSelectedTEValue( &func, material_code ); | ||
522 | |||
511 | if (editable && single_volume && material_same) | 523 | if (editable && single_volume && material_same) |
512 | { | 524 | { |
513 | mComboMaterial->setEnabled( TRUE ); | 525 | mComboMaterial->setEnabled( TRUE ); |
@@ -526,7 +538,8 @@ void LLPanelObject::getState( ) | |||
526 | { | 538 | { |
527 | mComboMaterial->remove(LEGACY_FULLBRIGHT_DESC); | 539 | mComboMaterial->remove(LEGACY_FULLBRIGHT_DESC); |
528 | } | 540 | } |
529 | mComboMaterial->setSimple(LLMaterialTable::basic.getName(material_code)); | 541 | // *TODO:Translate |
542 | mComboMaterial->setSimple(LLString(LLMaterialTable::basic.getName(material_code))); | ||
530 | } | 543 | } |
531 | } | 544 | } |
532 | else | 545 | else |