summaryrefslogtreecommitdiff
path: root/indra/newview/llpanelvolume.cpp
diff options
context:
space:
mode:
authorAndrey Kleshchev <117672381+akleshchev@users.noreply.github.com>2025-11-25 22:34:59 +0200
committerAndrey Kleshchev <117672381+akleshchev@users.noreply.github.com>2025-11-25 22:34:59 +0200
commita58abdac5fd642ee320345bd1eef0df253895dba (patch)
treec71007ccb2746b7bef7949c2c978cbfe768392ce /indra/newview/llpanelvolume.cpp
parent624eaf59a02dbd2f002fb45af01bbc17f04f8331 (diff)
parent9fe788e031e83aa6bfbb7bc9144079d2814018e8 (diff)
Merge branch develop into project/fonts-update
# Conflicts: # indra/llrender/llfontfreetype.cpp
Diffstat (limited to 'indra/newview/llpanelvolume.cpp')
-rw-r--r--indra/newview/llpanelvolume.cpp48
1 files changed, 34 insertions, 14 deletions
diff --git a/indra/newview/llpanelvolume.cpp b/indra/newview/llpanelvolume.cpp
index 951dc45a78..5916163f60 100644
--- a/indra/newview/llpanelvolume.cpp
+++ b/indra/newview/llpanelvolume.cpp
@@ -576,32 +576,52 @@ void LLPanelVolume::getState( )
return object->getMaterial();
}
} func;
- bool material_same = LLSelectMgr::getInstance()->getSelection()->getSelectedTEValue( &func, material_code );
+ LLObjectSelectionHandle selection = LLSelectMgr::getInstance()->getSelection();
+ bool material_same = selection->getSelectedTEValue( &func, material_code );
std::string LEGACY_FULLBRIGHT_DESC = LLTrans::getString("Fullbright");
- if (editable && single_volume && material_same)
+
+ bool enable_material = editable && single_volume && material_same;
+ LLCachedControl<bool> edit_linked(gSavedSettings, "EditLinkedParts", false);
+ if (!enable_material)
{
- mComboMaterial->setEnabled( true );
- if (material_code == LL_MCODE_LIGHT)
+ LLViewerObject* root = selection->getPrimaryObject();
+ while (root && !root->isAvatar() && root->getParent())
{
- if (mComboMaterial->getItemCount() == mComboMaterialItemCount)
+ LLViewerObject* parent = (LLViewerObject*)root->getParent();
+ if (parent->isAvatar())
{
- mComboMaterial->add(LEGACY_FULLBRIGHT_DESC);
+ break;
}
- mComboMaterial->setSimple(LEGACY_FULLBRIGHT_DESC);
- }
- else
- {
- if (mComboMaterial->getItemCount() != mComboMaterialItemCount)
+ if (!parent->isSelected())
{
- mComboMaterial->remove(LEGACY_FULLBRIGHT_DESC);
+ break;
}
+ root = parent;
+ }
+ if (root)
+ {
+ material_code = root->getMaterial();
+ }
+ }
+
+ mComboMaterial->setEnabled(enable_material);
- mComboMaterial->setSimple(std::string(LLMaterialTable::basic.getName(material_code)));
+ if (material_code == LL_MCODE_LIGHT)
+ {
+ if (mComboMaterial->getItemCount() == mComboMaterialItemCount)
+ {
+ mComboMaterial->add(LEGACY_FULLBRIGHT_DESC);
}
+ mComboMaterial->setSimple(LEGACY_FULLBRIGHT_DESC);
}
else
{
- mComboMaterial->setEnabled( false );
+ if (mComboMaterial->getItemCount() != mComboMaterialItemCount)
+ {
+ mComboMaterial->remove(LEGACY_FULLBRIGHT_DESC);
+ }
+
+ mComboMaterial->setSimple(std::string(LLMaterialTable::basic.getName(material_code)));
}
// Physics properties