diff options
author | Dave Houlton <euclid@lindenlab.com> | 2022-04-29 17:04:22 -0600 |
---|---|---|
committer | Dave Houlton <euclid@lindenlab.com> | 2022-04-29 17:04:22 -0600 |
commit | f05e58715e0a18a7ba2ace87c2ae45684c864169 (patch) | |
tree | 4f915345ecfcff00ef23c4b6a1ac62463fd1be4f /indra/newview/llpanelface.cpp | |
parent | 0e0c156bd00a01b38edee803e38b956d4f786701 (diff) |
SL-17116, SL-17277 single-face material save only
Diffstat (limited to 'indra/newview/llpanelface.cpp')
-rw-r--r-- | indra/newview/llpanelface.cpp | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/indra/newview/llpanelface.cpp b/indra/newview/llpanelface.cpp index 6f4d57f30e..6b3ca43402 100644 --- a/indra/newview/llpanelface.cpp +++ b/indra/newview/llpanelface.cpp @@ -1412,9 +1412,14 @@ void LLPanelFace::updateUI(bool force_set_values /*false*/) LLMaterialPtr material; LLSelectedTEMaterial::getCurrent(material, identical); - // QUICKHACK - enable this UI box, indiscriminatly. TODO discriminate DJH 2022-04 - childSetEnabled("button save material", true); - + // enable this UI box if a single face is selected. + BOOL is_single_face = !LLSelectMgr::getInstance()->getSelection()->isMultipleTESelected(); + childSetEnabled("button save material", static_cast<bool>(is_single_face)); + childSetEnabled("materialID", static_cast<bool>(is_single_face)); // doesn't work - why? + + // TODO: 2022-04 conflicts with media button placement. hide the button if applying media + // i.e. childSetVisible("button save material", !applying_media); + if (material && editable) { LL_DEBUGS("Materials") << material->asLLSD() << LL_ENDL; |