diff options
Diffstat (limited to 'indra/newview/llfloatertools.cpp')
-rw-r--r-- | indra/newview/llfloatertools.cpp | 32 |
1 files changed, 28 insertions, 4 deletions
diff --git a/indra/newview/llfloatertools.cpp b/indra/newview/llfloatertools.cpp index 9854d2594b..dbd3643742 100644 --- a/indra/newview/llfloatertools.cpp +++ b/indra/newview/llfloatertools.cpp @@ -43,6 +43,7 @@ #include "llcheckboxctrl.h" #include "llcombobox.h" #include "lldraghandle.h" +#include "llerror.h" #include "llfloaterbuildoptions.h" #include "llfloatermediasettings.h" #include "llfloateropenobject.h" @@ -563,7 +564,8 @@ void LLFloaterTools::updatePopup(LLCoordGL center, MASK mask) mBtnEdit ->setToggleState( edit_visible ); mRadioGroupEdit->setVisible( edit_visible ); - childSetVisible("RenderingCost", edit_visible || focus_visible || move_visible); + bool linked_parts = gSavedSettings.getBOOL("EditLinkedParts"); + childSetVisible("RenderingCost", !linked_parts && (edit_visible || focus_visible || move_visible)); if (mCheckSelectIndividual) { @@ -975,6 +977,8 @@ void LLFloaterTools::onClickGridOptions() S32 LLFloaterTools::calcRenderCost() { S32 cost = 0; + std::set<LLUUID> textures; + for (LLObjectSelection::iterator selection_iter = LLSelectMgr::getInstance()->getSelection()->begin(); selection_iter != LLSelectMgr::getInstance()->getSelection()->end(); ++selection_iter) @@ -985,11 +989,14 @@ S32 LLFloaterTools::calcRenderCost() LLVOVolume *viewer_volume = (LLVOVolume*)select_node->getObject(); if (viewer_volume) { - cost += viewer_volume->getRenderCost(); + cost += viewer_volume->getRenderCost(textures); + cost += textures.size() * 5; + textures.clear(); } } } + return cost; } @@ -1103,7 +1110,8 @@ void LLFloaterTools::getMediaState() childSetEnabled("edit_media", FALSE); childSetEnabled("media_info", FALSE); media_info->setEnabled(FALSE); - media_info->clear();*/ + media_info->clear();*/ + LL_WARNS("LLFloaterTools: media") << "Media not enabled (no capability) in this region!" << LL_ENDL; clearMediaSettings(); return; } @@ -1122,11 +1130,27 @@ void LLFloaterTools::getMediaState() LLVOVolume* object = dynamic_cast<LLVOVolume*>(node->getObject()); if (NULL != object) { - if (!object->permModify() || object->isMediaDataBeingFetched()) + if (!object->permModify()) { + LL_INFOS("LLFloaterTools: media") + << "Selection not editable due to lack of modify permissions on object id " + << object->getID() << LL_ENDL; + editable = false; break; } + // XXX DISABLE this for now, because when the fetch finally + // does come in, the state of this floater doesn't properly + // update. This needs more thought. +// if (object->isMediaDataBeingFetched()) +// { +// LL_INFOS("LLFloaterTools: media") +// << "Selection not editable due to media data being fetched for object id " +// << object->getID() << LL_ENDL; +// +// editable = false; +// break; +// } } } } |