For EXT-3114: [BSI] Can't right click > edit a no-mod attachment

--HG--
branch : avatar-pipeline
meow-7.2.2
Brad Payne (Vir Linden) 2009-12-16 11:34:46 -05:00
parent 2dd09062d1
commit adec0ba983
3 changed files with 22 additions and 1 deletions

View File

@ -2277,6 +2277,26 @@ BOOL LLSelectMgr::selectGetAllValid()
return TRUE;
}
//-----------------------------------------------------------------------------
// selectGetAllValidAndObjectsFound() - return TRUE if selections are
// valid and objects are found.
//
// For EXT-3114 - same as selectGetModify() without the modify check.
//-----------------------------------------------------------------------------
BOOL LLSelectMgr::selectGetAllValidAndObjectsFound()
{
for (LLObjectSelection::iterator iter = getSelection()->begin();
iter != getSelection()->end(); iter++ )
{
LLSelectNode* node = *iter;
LLViewerObject* object = node->getObject();
if( !object || !node->mValid )
{
return FALSE;
}
}
return TRUE;
}
//-----------------------------------------------------------------------------
// selectGetModify() - return TRUE if current agent can modify all

View File

@ -535,6 +535,7 @@ public:
// Returns TRUE if the viewer has information on all selected objects
BOOL selectGetAllRootsValid();
BOOL selectGetAllValid();
BOOL selectGetAllValidAndObjectsFound();
// returns TRUE if you can modify all selected objects.
BOOL selectGetRootsModify();

View File

@ -2630,7 +2630,7 @@ bool enable_object_edit()
enable = LLViewerParcelMgr::getInstance()->allowAgentBuild()
|| LLSelectMgr::getInstance()->getSelection()->isAttachment();
}
else if (LLSelectMgr::getInstance()->selectGetModify())
else if (LLSelectMgr::getInstance()->selectGetAllValidAndObjectsFound())
{
enable = true;
}