diff options
Diffstat (limited to 'indra')
-rw-r--r-- | indra/newview/lltexturectrl.cpp | 14 | ||||
-rw-r--r-- | indra/newview/lltexturectrl.h | 2 |
2 files changed, 10 insertions, 6 deletions
diff --git a/indra/newview/lltexturectrl.cpp b/indra/newview/lltexturectrl.cpp index 87c05c162a..2dad9cd2dc 100644 --- a/indra/newview/lltexturectrl.cpp +++ b/indra/newview/lltexturectrl.cpp @@ -416,6 +416,9 @@ BOOL LLFloaterTexturePicker::postBuild() mInventoryPanel = getChild<LLInventoryPanel>("inventory panel"); + // if can select both materials and textures, set textures_material_combo's layout as visible + childSetVisible("combo_layout", mInventoryPickType == LLTextureCtrl::PICK_TEXTURE_MATERIAL); + mTextureMaterialsCombo = getChild<LLComboBox>("textures_material_combo"); mTextureMaterialsCombo->setCommitCallback(onSelectTextureMaterials, this); @@ -1207,16 +1210,11 @@ void LLFloaterTexturePicker::onSelectTextureMaterials(LLUICtrl* ctrl, void *user LLFloaterTexturePicker* self = (LLFloaterTexturePicker*)userdata; int index = self->mTextureMaterialsCombo->getValue().asInteger(); - // IMPORTANT: make sure these match the entries in floater_texture_ctrl.xml - // for the textures_material_combo combo box - const int textures_and_materials = 0; - const int textures_only = 1; - const int materials_only = 2; - U32 filter_types = 0x0; if (self->mInventoryPickType != LLTextureCtrl::PICK_TEXTURE_MATERIAL) { + // mInventoryPickType overrides combo index = self->mInventoryPickType; } @@ -1270,6 +1268,9 @@ void LLFloaterTexturePicker::setInventoryPickType(LLTextureCtrl::EPickInventoryT { mInventoryPickType = type; + // if can select both materials and textures, set textures_material_combo's layout as visible + childSetVisible("combo_layout", mInventoryPickType == LLTextureCtrl::PICK_TEXTURE_MATERIAL); + mLocalScrollCtrl->clearRows(); if (mInventoryPickType == LLTextureCtrl::PICK_TEXTURE_MATERIAL) { @@ -1285,6 +1286,7 @@ void LLFloaterTexturePicker::setInventoryPickType(LLTextureCtrl::EPickInventoryT LLLocalGLTFMaterialMgr::getInstance()->feedScrollList(mLocalScrollCtrl); } + // refresh filters onSelectTextureMaterials(0, this); } diff --git a/indra/newview/lltexturectrl.h b/indra/newview/lltexturectrl.h index fb409af42b..9cb86a2e74 100644 --- a/indra/newview/lltexturectrl.h +++ b/indra/newview/lltexturectrl.h @@ -78,6 +78,8 @@ public: TEXTURE_CANCEL } ETexturePickOp; + // Should match the entries in floater_texture_ctrl.xml + // for the textures_material_combo combo box typedef enum e_pick_inventory_type { PICK_TEXTURE_MATERIAL = 0, |