diff options
author | Mnikolenko Productengine <mnikolenko@productengine.com> | 2022-04-19 02:33:59 +0300 |
---|---|---|
committer | Mnikolenko Productengine <mnikolenko@productengine.com> | 2022-04-19 02:33:59 +0300 |
commit | 2445525cc573024f8eb64cabac1e6e3dc3362085 (patch) | |
tree | e1633365e3a577f3f14b9b6ca07d4f07a88c50f2 /indra/newview/llpanelface.cpp | |
parent | a0ec6fd37143dd78ee2531e12ff17c7d2ee935dd (diff) |
SL-17231 Copying textures should be disabled if object content was not yet updated
Diffstat (limited to 'indra/newview/llpanelface.cpp')
-rw-r--r-- | indra/newview/llpanelface.cpp | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/indra/newview/llpanelface.cpp b/indra/newview/llpanelface.cpp index f50f587f8f..d50d42bf2f 100644 --- a/indra/newview/llpanelface.cpp +++ b/indra/newview/llpanelface.cpp @@ -330,6 +330,13 @@ LLPanelFace::~LLPanelFace() } +void LLPanelFace::draw() +{ + updateCopyTexButton(); + + LLPanel::draw(); +} + void LLPanelFace::sendTexture() { LLTextureCtrl* mTextureCtrl = getChild<LLTextureCtrl>("texture control"); @@ -1522,7 +1529,6 @@ void LLPanelFace::updateUI(bool force_set_values /*false*/) S32 selected_count = LLSelectMgr::getInstance()->getSelection()->getObjectCount(); BOOL single_volume = (selected_count == 1); mMenuClipboardColor->setEnabled(editable && single_volume); - mMenuClipboardTexture->setEnabled(editable && single_volume); // Set variable values for numeric expressions LLCalc* calcp = LLCalc::getInstance(); @@ -1583,6 +1589,17 @@ void LLPanelFace::updateUI(bool force_set_values /*false*/) } +void LLPanelFace::updateCopyTexButton() +{ + LLViewerObject* objectp = LLSelectMgr::getInstance()->getSelection()->getFirstObject(); + mMenuClipboardTexture->setEnabled(objectp && objectp->getPCode() == LL_PCODE_VOLUME && objectp->permModify() + && !objectp->isPermanentEnforced() && !objectp->isInventoryPending() + && (LLSelectMgr::getInstance()->getSelection()->getObjectCount() == 1)); + std::string tooltip = (objectp && objectp->isInventoryPending()) ? LLTrans::getString("LoadingContents") : getString("paste_options"); + mMenuClipboardTexture->setToolTip(tooltip); + +} + void LLPanelFace::refresh() { LL_DEBUGS("Materials") << LL_ENDL; |