MAINT-1789 FIXED Object inspector doesn't show any information about object if user uses Select Only My Objects option
parent
c686407731
commit
f0db860b8a
|
|
@ -219,7 +219,7 @@ void LLInspectObject::onOpen(const LLSD& data)
|
|||
LLViewerMediaFocus::getInstance()->clearFocus();
|
||||
|
||||
LLSelectMgr::instance().deselectAll();
|
||||
mObjectSelection = LLSelectMgr::instance().selectObjectAndFamily(obj);
|
||||
mObjectSelection = LLSelectMgr::instance().selectObjectAndFamily(obj,FALSE,TRUE);
|
||||
|
||||
// Mark this as a transient selection
|
||||
struct SetTransient : public LLSelectedNodeFunctor
|
||||
|
|
|
|||
|
|
@ -368,7 +368,7 @@ LLObjectSelectionHandle LLSelectMgr::selectObjectOnly(LLViewerObject* object, S3
|
|||
//-----------------------------------------------------------------------------
|
||||
// Select the object, parents and children.
|
||||
//-----------------------------------------------------------------------------
|
||||
LLObjectSelectionHandle LLSelectMgr::selectObjectAndFamily(LLViewerObject* obj, BOOL add_to_end)
|
||||
LLObjectSelectionHandle LLSelectMgr::selectObjectAndFamily(LLViewerObject* obj, BOOL add_to_end, BOOL ignore_select_owned)
|
||||
{
|
||||
llassert( obj );
|
||||
|
||||
|
|
@ -385,7 +385,7 @@ LLObjectSelectionHandle LLSelectMgr::selectObjectAndFamily(LLViewerObject* obj,
|
|||
return NULL;
|
||||
}
|
||||
|
||||
if (!canSelectObject(obj))
|
||||
if (!canSelectObject(obj,ignore_select_owned))
|
||||
{
|
||||
//make_ui_sound("UISndInvalidOp");
|
||||
return NULL;
|
||||
|
|
@ -6771,29 +6771,32 @@ void LLSelectMgr::validateSelection()
|
|||
getSelection()->applyToObjects(&func);
|
||||
}
|
||||
|
||||
BOOL LLSelectMgr::canSelectObject(LLViewerObject* object)
|
||||
BOOL LLSelectMgr::canSelectObject(LLViewerObject* object, BOOL ignore_select_owned)
|
||||
{
|
||||
// Never select dead objects
|
||||
if (!object || object->isDead())
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
||||
if (mForceSelection)
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
if ((gSavedSettings.getBOOL("SelectOwnedOnly") && !object->permYouOwner()) ||
|
||||
(gSavedSettings.getBOOL("SelectMovableOnly") && (!object->permMove() || object->isPermanentEnforced())))
|
||||
if(!ignore_select_owned)
|
||||
{
|
||||
// only select my own objects
|
||||
return FALSE;
|
||||
if ((gSavedSettings.getBOOL("SelectOwnedOnly") && !object->permYouOwner()) ||
|
||||
(gSavedSettings.getBOOL("SelectMovableOnly") && (!object->permMove() || object->isPermanentEnforced())))
|
||||
{
|
||||
// only select my own objects
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
// Can't select orphans
|
||||
if (object->isOrphaned()) return FALSE;
|
||||
|
||||
|
||||
// Can't select avatars
|
||||
if (object->isAvatar()) return FALSE;
|
||||
|
||||
|
|
|
|||
|
|
@ -454,7 +454,7 @@ public:
|
|||
//
|
||||
// *NOTE: You must hold on to the object selection handle, otherwise
|
||||
// the objects will be automatically deselected in 1 frame.
|
||||
LLObjectSelectionHandle selectObjectAndFamily(LLViewerObject* object, BOOL add_to_end = FALSE);
|
||||
LLObjectSelectionHandle selectObjectAndFamily(LLViewerObject* object, BOOL add_to_end = FALSE, BOOL ignore_select_owned = FALSE);
|
||||
|
||||
// For when you want just a child object.
|
||||
LLObjectSelectionHandle selectObjectOnly(LLViewerObject* object, S32 face = SELECT_ALL_TES);
|
||||
|
|
@ -609,7 +609,7 @@ public:
|
|||
void validateSelection();
|
||||
|
||||
// returns TRUE if it is possible to select this object
|
||||
BOOL canSelectObject(LLViewerObject* object);
|
||||
BOOL canSelectObject(LLViewerObject* object, BOOL ignore_select_owned = FALSE);
|
||||
|
||||
// Returns TRUE if the viewer has information on all selected objects
|
||||
BOOL selectGetAllRootsValid();
|
||||
|
|
|
|||
Loading…
Reference in New Issue